Farah
Board Regular
- Joined
- Oct 4, 2005
- Messages
- 98
Hello,
I have tried to do something, which i have achieved most of it, but getting some problem in it.
I want to do something like this as in code:
What the above code should do :
At the workbook open, show userform6; i will press one button on userform3, which will unload it. Code is as follows:
Userfrm6 code:.
Once userform6 is unload, it will check If File name is Farah, then userform3.show
Userform3 has one textboxes on which a "new workbook name" is to be given and there is a commandbutton. Once a name is given in textbox and commandbutton is pressed, it will only allow for this workbook to be saved with another name like a Saveas function and the opened file will close and saved file will remain on the screen.
Once the saved workbook is also closed. and it is re-opened again, it shows Userform6 again and if File name is not Farah, it should show Userform4 but in my case, it is again showing userform3 as in the code.
Why is it showing Userform3 in the newly saved workbook.. I want it to show Userform4 instead of Userform3.
What am i doing wrong in the code ?
Thank you for your help.
Warm Regards,
Farah
I have tried to do something, which i have achieved most of it, but getting some problem in it.
I want to do something like this as in code:
Code:
Private Sub Workbook_Open()
Sheets("abc").Activate
Application.Wait 2
UserForm6.Show
If pExit = True Then Exit Sub
Application.Quit
Application.Wait 2
If ActiveWorkbook.Name = "Farah.xls" Then
UserForm3.Show
If pExit = True Then Exit Sub
Me.Saved = True
Application.Quit
Else
UserForm4.Show
End If
End Sub
Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
Cancel = True
If ActiveWorkbook.Name <> "Farah.xls" Then Exit Sub
UserForm4.Show
End Sub
What the above code should do :
At the workbook open, show userform6; i will press one button on userform3, which will unload it. Code is as follows:
Userfrm6 code:.
Code:
Private Sub CommandButton1_Click()
Unload Me
UserForm3.Show
End Sub
Once userform6 is unload, it will check If File name is Farah, then userform3.show
Userform3 has one textboxes on which a "new workbook name" is to be given and there is a commandbutton. Once a name is given in textbox and commandbutton is pressed, it will only allow for this workbook to be saved with another name like a Saveas function and the opened file will close and saved file will remain on the screen.
Once the saved workbook is also closed. and it is re-opened again, it shows Userform6 again and if File name is not Farah, it should show Userform4 but in my case, it is again showing userform3 as in the code.
Why is it showing Userform3 in the newly saved workbook.. I want it to show Userform4 instead of Userform3.
What am i doing wrong in the code ?
Thank you for your help.
Warm Regards,
Farah