![]() |
Command button on worksheet
I'm relatively new to Excel VBA.
I've added a command button to a worksheet, which I want to use to open a userform. The code behind the button works (used debug to make sure), but I cannot get the Click event of the button to work on the spreadsheet. When I click on the button, it just selects it for editing. Dale -- Email address is not valid. Please reply to newsgroup only. |
Command button on worksheet
Disregard!
Apparantly, all I had to do was close the workbook and open it again. Duh! -- Email address is not valid. Please reply to newsgroup only. "Dale Fye" wrote: I'm relatively new to Excel VBA. I've added a command button to a worksheet, which I want to use to open a userform. The code behind the button works (used debug to make sure), but I cannot get the Click event of the button to work on the spreadsheet. When I click on the button, it just selects it for editing. Dale -- Email address is not valid. Please reply to newsgroup only. |
Command button on worksheet
Hi Dale,
Try taking it out of Design Mode. On Control Toolbox Menu, click on Design Mode. See if that works Paul Dale Fye wrote: I'm relatively new to Excel VBA. I've added a command button to a worksheet, which I want to use to open a userform. The code behind the button works (used debug to make sure), but I cannot get the Click event of the button to work on the spreadsheet. When I click on the button, it just selects it for editing. Dale -- Email address is not valid. Please reply to newsgroup only. |
Command button on worksheet
Also, there is an icon that looks like a carpenters square and a pencil,
under the toolbox toolbar, it toggles between desing mode and exit desing mode. So you don't necessarily need to close the book. -- If this posting was helpful, please click on the Yes button. Regards, Michael Arch. "Dale Fye" wrote: Disregard! Apparantly, all I had to do was close the workbook and open it again. Duh! -- Email address is not valid. Please reply to newsgroup only. "Dale Fye" wrote: I'm relatively new to Excel VBA. I've added a command button to a worksheet, which I want to use to open a userform. The code behind the button works (used debug to make sure), but I cannot get the Click event of the button to work on the spreadsheet. When I click on the button, it just selects it for editing. Dale -- Email address is not valid. Please reply to newsgroup only. |
Command button on worksheet
Dale
I wouldn't go as far as saying "Duh". The reason for the "selection" is that you were in Design mode - next time click on the triangle in the left hand corner of the "control toolbox". Mistakes like this are quite common in an Excel environment - live with it. Regards SysAccountant "Dale Fye" wrote: Disregard! Apparantly, all I had to do was close the workbook and open it again. Duh! -- Email address is not valid. Please reply to newsgroup only. "Dale Fye" wrote: I'm relatively new to Excel VBA. I've added a command button to a worksheet, which I want to use to open a userform. The code behind the button works (used debug to make sure), but I cannot get the Click event of the button to work on the spreadsheet. When I click on the button, it just selects it for editing. Dale -- Email address is not valid. Please reply to newsgroup only. |
All times are GMT +1. The time now is 04:21 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com