1) The code of the UserForm
2) The code which make a UserForm display
1) The code of the UserForm
2) The code which make a UserForm display
1) double click any object in the userform
2) the general syntax is UserForm1.Show
you can type that into the immediate window, or trigger it from another event, like pressing a button on your sheet, or double clicking a certain cell, or any number of other events.
1) When I make
Developer - Controls - Insert - Form Controls - (Select A Form Control) - (Then Paste It To The Spreadsheet) - (Then double click the control)
Nothing happens
however I make
Developer - Controls - Insert - ActiveX Controls - (Select A ActiveX Control) - (Then Paste It To The Spreadsheet) - (Then double click the control)
Code Screen Opens
So how do I create a code for a button on the spreadsheet?
2) What I ask is where do I write that?
For the "FORMS CONTROL" button, first write the code in a standard module. Then right click the button and select "assign Macro"...
Ben Van Johnson
1) If you're using a form control, right click the button and select "Assign Macro". Select the macro that you want to execute when the button is pressed. This of course mandates that you already have a sub written, or at least a sub defined.
If you're using an ActiveX control, the steps you described are correct. The "code screen" should display a sub like "Private Sub CommandButton1_Click()" (or whatever your button is named. This is where your code goes.
2) I hope I've answered this question in my previous paragraphs.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks