LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 921
Default call a macro with arguments in a Command Button

1.) How do you call a macro with Cell value arguments in a Command Button on
Sheet1
which passes Cell A1 value, not cell A1 reference.
'Target' argument must pass A1 value

Problem is 'Target' passes back the cell reference not the value in the Cell.

Example
Public Sub Cmd_Services_Click(ByVal Target As CommandButton)
' A1 value is Supplies
'run code in Sheet1
ABC('Range("$A$1").Value) ????
End Sub

2.) In the properties window for command button, Name = Cmd_Services
Should it be Name - Cmd_Services(A1) ?
Cmd_Services(Sheet1!A1) ?
 
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
Call up build in excel command using macro Will Gray Excel Programming 1 August 24th 06 03:35 AM
Custom button to call a macro in Personal David Walker Excel Programming 1 July 1st 06 11:45 PM
Call Userfor and click button with macro ExcelMonkey[_190_] Excel Programming 2 February 25th 05 04:41 PM
call excel 2003 macro from command line Keven[_2_] Excel Programming 1 June 2nd 04 05:33 AM
Button won't call macro Lift Off Excel Programming 6 April 13th 04 10:44 PM


All times are GMT +1. The time now is 06:15 AM.

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

About Us

"It's about Microsoft Excel"