Hi
Try the below example
Public Sub tESTER2(MyCell As Range)
Dim rsp
rsp = MsgBox(MyCell.Value, vbOKOnly)
End Sub
In the immediate window type your range in the call to the Sub e.g.
tester2(Worksheets("Sheet4").cells(1,1))
--
Tony Green
"Jeff" wrote:
> 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) ?
> .
> .
>
> I'm Frustrated
> --
> Jeff :-)
>
> --
> Jeff
|