98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Initialise
Initialise
Resolved · High Priority · Version 2007
Hindu has attended:
Excel VBA Intro Intermediate course
Excel Advanced course
Initialise
Hello,
I am having problem intialising a UserForm on when document opens. And also I cannot make the command button work. I am trying to do a form and I want the form to open when initialise and to fill in the form then it actully fills in the actual word/excel form. I have inserted bookmarks but when I press cmd OK nothing happens.
Regards
Hindu
RE: Initialise
Hi Hindu
Thanks for getting in touch. For the first part, you have to insert a macro at the Workbook level. This wouldn't have been covered on a standard VBA intro / intermediate course.
In the VBE, above where the Forms are stored in Project Explorer, there is an object called "ThisWorkbook". Double-click this and add code like this:
Private Sub Workbook_Open()
UserForm1.Show
End Sub
...where UserForm1 is the name of your form. This will bring up the form on first load.
For the second part, what code have you put behind the OK button? It may be useful to paste that code in your reply.
Kind regards
Gary Fenn
Microsoft Office Specialist Trainer
Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector
Will be marked as resolved in 5 days
Notice: This is an automated message. Due to inactivity, this forum post will be marked as 'resolved' if there are no further responses in the next 5 days.
Tue 26 Feb 2013: Automatically marked as resolved.
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Get back to active cellIf you have scrolled away from the active celland want to get back t it quicly you can Ctrl and Backspace to get back |