Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

assigning command buttons userfo

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

ResolvedVersion 2003

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

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.

 

Training courses

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
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Sum Up All the Values in A Column

If you want to quickly calculate the Summed values of all cells in a column in Excel 2003 normally you would use the SUM formula. (eg if you wanted to calculate the values in Column C rows 10 to 25) the formula would be:

=SUM(C10:C25)

However, if you keep adding values to column C you would keep having to modify the above SUM formula which can get quite annoying.

To get around this you can sum all the values in a column using the following formula:

=SUM(COLUMN:COLUMN)

Which, in our example, would be:

=SUM(C:C)

NOTE You cannot place this formula in column C, or else Excel 2003 will show a circular reference error.

The formula must be placed in any other column, EXCEPT the one being calculated.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.12 secs.