ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hyperlink calls macro passing argument (https://www.excelbanter.com/excel-programming/377066-hyperlink-calls-macro-passing-argument.html)

Jeff

Hyperlink calls macro passing argument
 
Can you click on a hyperlink containing an argument, that calls a macro with
the argument.

I need to pass a string or Argument to the Macro with a Hyperlink

example
in spreadsheet you have
A
1 Hyperlink
2 Supplier

would run Macro
ABC("A2")
or
ABC("Supplier")
--
Jeff


--
Jeff

Jim Cone

Hyperlink calls macro passing argument
 
You have an answer in your original post (23 minutes earlier) .
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Jeff"
wrote in message
Can you click on a hyperlink containing an argument, that calls a macro with
the argument.

I need to pass a string or Argument to the Macro with a Hyperlink
example
in spreadsheet you have
A
1 Hyperlink
2 Supplier

would run Macro
ABC("A2")
or
ABC("Supplier")
--
Jeff
--
Jeff

Jeff

Hyperlink calls macro passing argument
 
Thank You for the Help :-)

I've had trouble being able to post a message at times.
Sorry for duplicates

Please Help... this is basic stuff but can't seem to figure it out.
How do you hide a command button in vba???
these don't work...
Worksheets("Service Information").Range("B13").Hide = False
Worksheets("Service Information").Range(Cells("B13")).Hide = False
Worksheets("Service Information").Range("B13:B13").Visible = False

Jeff

Hyperlink calls macro passing argument
 
I figured it out. :-)


Dim SH As Worksheet
Set SH = ThisWorkbook.Sheets("Sheet1")
If Range("A1").Value2 = "" Then
With SH.OLEObjects("CommandButton1")
.Visible = False
.Enabled = False
End With
Else
With SH.OLEObjects("CommandButton1")
.Visible = True
.Enabled = True
End With
--
Jeff


"Jeff" wrote:

Thank You for the Help :-)

I've had trouble being able to post a message at times.
Sorry for duplicates

Please Help... this is basic stuff but can't seem to figure it out.
How do you hide a command button in vba???
these don't work...
Worksheets("Service Information").Range("B13").Hide = False
Worksheets("Service Information").Range(Cells("B13")).Hide = False
Worksheets("Service Information").Range("B13:B13").Visible = False
.
.



Jeff :-)

--
Jeff


"Jim Cone" wrote:

You have an answer in your original post (23 minutes earlier) .
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Jeff"
wrote in message
Can you click on a hyperlink containing an argument, that calls a macro with
the argument.

I need to pass a string or Argument to the Macro with a Hyperlink
example
in spreadsheet you have
A
1 Hyperlink
2 Supplier

would run Macro
ABC("A2")
or
ABC("Supplier")
--
Jeff
--
Jeff



All times are GMT +1. The time now is 12:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com