Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
command button add another command Wanna Learn Excel Discussion (Misc queries) 5 December 7th 08 11:42 PM
Command Button inspirz Excel Discussion (Misc queries) 1 March 29th 07 06:38 PM
Command Button Gee[_2_] Excel Programming 6 April 23rd 04 12:10 AM
Command Button vs Control Button RGibson Excel Programming 1 October 14th 03 02:24 AM
Command Button vs Form Button T K Excel Programming 4 August 26th 03 07:26 PM


All times are GMT +1. The time now is 03:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"