Upon opening worksheet check value is present in userform

Logit

Well-known Member
Joined
Aug 31, 2016
Messages
2,961
.
You are using the wrong macro.

Look again at the macro in my last post.
 

Some videos you may like

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
3,161
Ok,

See code in use below THEN please do these steps below

Then once in place make sure you have one name in the list then do this.

SELECT POSTAGE WORKSHEET.
USERFORM OPENS
SELECT LAST NAME IN LIST
PRESS BLACK DATE TRANSFER BUTTON
CLICK OK TO FIRST MSGBOX
THEN CLICK OK TO SECOND MSGBOX

Then do you see the Ruun Time Error 91 ??




Code:
Private Sub Worksheet_Activate()Application.GoTo Sheets("POSTAGE").Range("A" & Rows.Count).End(xlUp).Offset(1, 0), True
ActiveWindow.SmallScroll UP:=14




Dim ws As Worksheet
Set ws = Sheets("POSTAGE")
Dim i As Integer
i = 1
Do Until i = 5000 ' <-- change number rows to check here
    If ws.Range("G" & i).Interior.Color = RGB(255, 0, 0) Then
        PostageTransferSheet.Show
        Exit Sub
    End If
i = i + 1
Loop




MsgBox "NO MORE CUSTOMERS IN POSTAGE LIST", vbCritical, "POSTAGE DATE TRANSFER SHEET MESSAGE"




End Sub
 

Logit

Well-known Member
Joined
Aug 31, 2016
Messages
2,961
.
I do not receive an error message.

Date is placed in appropriate cell.


I will be away for awhile. Will check upon my return.
 

Watch MrExcel Video

Forum statistics

Threads
1,090,472
Messages
5,414,733
Members
403,543
Latest member
Phx007

This Week's Hot Topics

Top