Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Command Button
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 -- XCESIV ------------------------------------------------------------------------ XCESIV's Profile: http://www.excelforum.com/member.php...o&userid=24271 View this thread: http://www.excelforum.com/showthread...hreadid=378865 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Command Button
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 "XCESIV" wrote in message ... 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 -- XCESIV ------------------------------------------------------------------------ XCESIV's Profile: http://www.excelforum.com/member.php...o&userid=24271 View this thread: http://www.excelforum.com/showthread...hreadid=378865 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
command button add another command | Excel Discussion (Misc queries) | |||
Command Button | Excel Discussion (Misc queries) | |||
Command Button | Excel Programming | |||
Command Button vs Control Button | Excel Programming | |||
Command Button vs Form Button | Excel Programming |