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