assigning command buttons userfo
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Assigning Command buttons to userform in 2003

Assigning Command buttons to userform in 2003

resolvedResolved · Medium Priority · Version 2003

replyReply Thu 23 Dec 2010, 14:37Delegate Martin said...

Martin has attended:
Excel Advanced course
Excel VBA Intro Intermediate course

Assigning Command buttons to userform in 2003

Hi,

I was recently on the VB course using Excel 2007. Now I am back at work I am using 2003. How do I link a command button in Excel 2003 to a UserForm in VB? I can easily select Macros to run, but I want the command button to launch the interface.

Thanks

For upcoming training course dates see: Pricing & availability

replyReply Tue 4 Jan 2011, 12:05Trainer Anthony said...

RE: Assigning Command buttons to userform in 2003

Hi Martin, thanks for your query. On our course our interface was called "frmMainInterface". When you have created the button on the spreadsheet, try double clicking on it (this will only work if you are in Design Mode). A click event subroutine will be created and the line of code you need would be:

frmMainInterface.Show

Back on the worksheet, activate the switch by coming out of Design Mode. It should be working now.

Hope this helps,

Anthony

Mon 10 Jan 2011: Automatically marked as resolved.

 

Please browse our web site to find out more about
excel classes and other Microsoft training courses.

Excel tip:

Changing Excel file and worksheet defaults

The appearance of any new Excel files or any new worksheets that are inserted into a file are controlled by two template files, Book.xlt and Sheet.xlt.

By opening, modifying and saving these templates you can change the default settings for all new files and/or all newly inserted sheets.

Use Book.xlt to make change to defaults for new workbooks; and Sheet.xlt to change defaults for sheets.

If you can't find either of these files on your computer, you can create and save them yourself.

You can do this simply by creating a new workbook with the setting you want to use as your defaults; then saving them with the appropriate name in the XLStart folder. If you are using Office 2003, this is usually found in C:\Program Files\Microsoft Office\Office11\XLStart.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard