Command Button

X

XCESIV

Im trying to put a command button on a spreadsheet i use for work.

I can make the button on the spreadsheet, but i am having troubles
assigning anything to it. It has been too long since i have done
anything like this

The button is in the Data file
This is a list of things i am hoping to have happen when the button is
pushed.
* Save As (Trans file)
* open (report file)
* Update the data in the report file which is being transfered from
Trans file.

Not to complicated i know, but for some reason i cant find how to
assign anything to the command button

Any Help would be very greatfull.

PS - If not to hard maybe some errorchecking could happen. Make sure
that the data balances before it saves the data to the transfer file.

I have error checking in the file already, but i was thinking that it
could let you know if u try and transfer the data when it does not
balance.

TY
 
R

Robin Hammond

I don't think with what you have provided you are going to get a description
of how to do all the things you want, but this at least shows you how to
assign a macro to a command button on a sheet. The macro can reside in an
add-in rather than the workbook in question.

With Sheets(1)

'add the control buttons
.Buttons.Add(0, 0, 183, 30).Select
Selection.OnAction = "MyMacroName"
Selection.Characters.Text = "Something or other"
Selection.Name = "btlMacroName"

End With

Robin Hammond
www.enhanceddatasystems.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top