ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,832
- Office Version
- 2007
- Platform
- Windows
Morning,
My goal is when i open the workbook i should see INCOME (1) open & either show the userform or not depending on cell value in B1
What i see happening is if i was last on worksheet INCOME (3) then i save & close the workbook when i next open it the code runs BUT when i close the userform i need to the close it once again.
This doesnt happen if the last worksheet was INCOME (1)
I have the two codes in use shown below,
This in the ThisWorkBook,
I also have this code in the right click on the worksheet tab,
My goal is when i open the workbook i should see INCOME (1) open & either show the userform or not depending on cell value in B1
What i see happening is if i was last on worksheet INCOME (3) then i save & close the workbook when i next open it the code runs BUT when i close the userform i need to the close it once again.
This doesnt happen if the last worksheet was INCOME (1)
I have the two codes in use shown below,
This in the ThisWorkBook,
Code:
Private Sub Workbook_Open()With Worksheets("INCOME (1)")
.Activate
.Range("A4").Select
End With
If Range("B1") = "" Then
Range("A4").Select
MYFINCOMEONE.Show
Else
End If
End Sub
I also have this code in the right click on the worksheet tab,
Code:
Private Sub Worksheet_Activate()
If Range("B1") = "" Then
Range("A4").Select
MYFINCOMEONE.Show
Else
End If
End Sub