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 / March 2006

Tip: Looking for answers? Try searching our database.

Using a disclaimer in excel

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Daniya - 21 Mar 2006 14:57 GMT
I have figured out the userform to create a disclaimer and it pops up when I
open the workbook but how do I get the work book to open/close according to
the selection they make. Right now it only closes via the cross, and the
option buttons in the user form don't do anything.

The code i am using to get the userform to come up is:
Private Sub Workbook_Open()
   Application.ScreenUpdating = True
   PopQuiz.Show
   Application.ScreenUpdating = False
End Sub

Answers in laymens terms please as i am a beginner!!

Thanks
Tom Ogilvy - 21 Mar 2006 15:17 GMT
Use the change event of the control

Private Sub Optionbutton1_Click()
 if OptiongButton1.Value = True then
    Unload me
    ThisWorkbook.Close SaveChanges:=True
 end if
End Sub

This code would go in the userform module.  In the userform module, the "Me"
refers to that userform.  

Signature

Regards,
Tom Ogilvy

> I have figured out the userform to create a disclaimer and it pops up when I
> open the workbook but how do I get the work book to open/close according to
[quoted text clipped - 11 lines]
>
> Thanks
Daniya - 21 Mar 2006 15:37 GMT
Tom

Thanks for your help but I didn't understand?!? Perhaps you can explain it a
bit mroe simply for me? I have only used VB today for the first time!

Thanks
Daniya

> Use the change event of the control
>
[quoted text clipped - 23 lines]
> >
> > Thanks
Tom Ogilvy - 21 Mar 2006 16:01 GMT
http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft® Excel 97 Visual Basic® Step by Step.
http://j-walk.com/ss/excel/tips/tip84.htm

See this tutorial here
http://www.dicks-blog.com/excel/2004/09/linking_userfor.html

http://support.microsoft.com/default.aspx?scid=kb;en-us;829070
How to use Visual Basic for Applications examples to control UserForms in
Microsoft Excel

Signature

Regards,
Tom Ogilvy

> Tom
>
[quoted text clipped - 31 lines]
> > >
> > > Thanks
 
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.