Upon opening worksheet check value is present in userform

Logit

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

Look again at the macro in my last post.
 

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
2,838
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,924
.
I do not receive an error message.

Date is placed in appropriate cell.


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

Forum statistics

Threads
1,082,342
Messages
5,364,783
Members
400,815
Latest member
gangstar67

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top