Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

Userform

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sandy - 29 May 2008 16:34 GMT
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
Sam Wilson - 29 May 2008 16:47 GMT
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

> I have created a userform:- name = frmWelcome. On the form I have a
> checkbox:- name = cbNoView. The form contains information concerning the
[quoted text clipped - 10 lines]
>
> Sandy
Sandy - 29 May 2008 18:19 GMT
Very simple and works a treat
Thank you
Sandy

> 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
[quoted text clipped - 21 lines]
>>
>> Sandy
Sam Wilson - 30 May 2008 08:18 GMT
Can you mark it as the answer, in case someone else searches for a similar
problem?

Sam

> Very simple and works a treat
> Thank you
[quoted text clipped - 25 lines]
> >>
> >> Sandy
dqsp - 29 May 2008 17:33 GMT
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
dqsp - 29 May 2008 17:57 GMT
> I use this code in combination with a registry-key (user-part)
>
[quoted text clipped - 12 lines]
> 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
Sandy - 29 May 2008 18:20 GMT
I will give this a try and report back later
Thanks Rob
Sandy

>> I use this code in combination with a registry-key (user-part)
>>
[quoted text clipped - 27 lines]
> Key:="AboutScreen", setting:=cbNoView.Value
> End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.