Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have created a userform:- name = frmWelcome. On the form I have a
checkbox:- name = cbNoView. The form contains information concerning the workbook. What I am trying to do is to have the form open with excel but should the user not want to see it again then tick the check box, and it will not open again. Can anyone point me in the right direction as to the code requirement and where it would be placed. Excel 2003 Sandy |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You could have a sheet in the workbook, and set that sheet's visibility to
very hidden, and then have the event record a 1 in cell A1 on this sheet if the checkbox is ticked. Then you just need to add an if statement before frmWelcome.show in your workbook open event. Sam "Sandy" wrote: I have created a userform:- name = frmWelcome. On the form I have a checkbox:- name = cbNoView. The form contains information concerning the workbook. What I am trying to do is to have the form open with excel but should the user not want to see it again then tick the check box, and it will not open again. Can anyone point me in the right direction as to the code requirement and where it would be placed. Excel 2003 Sandy |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Very simple and works a treat
Thank you Sandy "Sam Wilson" wrote in message ... You could have a sheet in the workbook, and set that sheet's visibility to very hidden, and then have the event record a 1 in cell A1 on this sheet if the checkbox is ticked. Then you just need to add an if statement before frmWelcome.show in your workbook open event. Sam "Sandy" wrote: I have created a userform:- name = frmWelcome. On the form I have a checkbox:- name = cbNoView. The form contains information concerning the workbook. What I am trying to do is to have the form open with excel but should the user not want to see it again then tick the check box, and it will not open again. Can anyone point me in the right direction as to the code requirement and where it would be placed. Excel 2003 Sandy |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can you mark it as the answer, in case someone else searches for a similar
problem? Sam "Sandy" wrote: Very simple and works a treat Thank you Sandy "Sam Wilson" wrote in message ... You could have a sheet in the workbook, and set that sheet's visibility to very hidden, and then have the event record a 1 in cell A1 on this sheet if the checkbox is ticked. Then you just need to add an if statement before frmWelcome.show in your workbook open event. Sam "Sandy" wrote: I have created a userform:- name = frmWelcome. On the form I have a checkbox:- name = cbNoView. The form contains information concerning the workbook. What I am trying to do is to have the form open with excel but should the user not want to see it again then tick the check box, and it will not open again. Can anyone point me in the right direction as to the code requirement and where it would be placed. Excel 2003 Sandy |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I use this code in combination with a registry-key (user-part)
************* ' Show About screen If GetSetting(appname:="YourExcelSheetName", Section:="About", _ Key:="Aboutscreen") = "" Then GoTo Next2do1 If GetSetting(appname:="YourExcelSheetName", Section:="About", _ Key:="Aboutscreen") = True Then GoTo Next2do2 Next2do1: UserForm1.Show Next2do2: ******** Hope this helps Rob |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 29 mei, 18:33, dqsp wrote:
I use this code in combination with a registry-key (user-part) ************* ' * Show About screen * * If GetSetting(appname:="YourExcelSheetName", Section:="About", _ * * * Key:="Aboutscreen") = "" Then GoTo Next2do1 * * If GetSetting(appname:="YourExcelSheetName", Section:="About", _ * * * Key:="Aboutscreen") = True Then GoTo Next2do2 Next2do1: * * UserForm1.Show Next2do2: ******** Hope this helps Rob The procedure is part of a workbook_open event What I forgot: Of course when ticking the checkbox you need the code to write in the registry. The code is: Private Sub cbNoView_Click() ' Information is written in ' HKEY_CURRENT_USER/Software/VB and VBA Program Settings/ YourExcelSheetName ' Section About ' Key AboutScreen SaveSetting appname:="YourExcelSheetName", Section:="About", _ Key:="AboutScreen", setting:=cbNoView.Value End Sub |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I will give this a try and report back later
Thanks Rob Sandy "dqsp" wrote in message ... On 29 mei, 18:33, dqsp wrote: I use this code in combination with a registry-key (user-part) ************* ' Show About screen If GetSetting(appname:="YourExcelSheetName", Section:="About", _ Key:="Aboutscreen") = "" Then GoTo Next2do1 If GetSetting(appname:="YourExcelSheetName", Section:="About", _ Key:="Aboutscreen") = True Then GoTo Next2do2 Next2do1: UserForm1.Show Next2do2: ******** Hope this helps Rob The procedure is part of a workbook_open event What I forgot: Of course when ticking the checkbox you need the code to write in the registry. The code is: Private Sub cbNoView_Click() ' Information is written in ' HKEY_CURRENT_USER/Software/VB and VBA Program Settings/ YourExcelSheetName ' Section About ' Key AboutScreen SaveSetting appname:="YourExcelSheetName", Section:="About", _ Key:="AboutScreen", setting:=cbNoView.Value End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there an easy Copy/Paste of a Userform ? (Entire Userform Including tx & cbx's) | Excel Programming | |||
Userform to enter values and shown in same userform in list | Excel Programming | |||
Looping procedure calls userform; how to exit loop (via userform button)? | Excel Programming | |||
Activating userform and filling it with data form row where userform is activate | Excel Programming | |||
Access from add_in userform to main template userform.... | Excel Programming |