ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Shape Marcro with Parameter (https://www.excelbanter.com/excel-programming/295278-shape-marcro-parameter.html)

Stefan Rauchegger

Shape Marcro with Parameter
 
Hi NG!
Is it possible to serve many shapes with one Macro which expects a
parameter?
I get Errors like "expression too complex" (<--bumpy translation from
german)

My workaround would be using Application.Caller and a dictionary with
appropriate parameters for each served shape.

TIA

Stefan

Robin Hammond[_2_]

Shape Marcro with Parameter
 
Stefan,

Not sure because I've never tried, but surely it is much simpler to have one
big macro that takes a parameter and a one line macro for each shape. I do
this for all my Help files.

Sub Help1()
'possibly in a form module or linked to a command bar
RunHelp 1
End Sub

Sub Help2()
RunHelp 2
End Sub

Public Sub RunHelp(nIndex)
'in a general module with option private module set in the declarations
'launch the associated help file based on the parameter
End Sub

HTH,

Robin Hammond
www.enhanceddatasystems.com

"Stefan Rauchegger" wrote in message
om...
Hi NG!
Is it possible to serve many shapes with one Macro which expects a
parameter?
I get Errors like "expression too complex" (<--bumpy translation from
german)

My workaround would be using Application.Caller and a dictionary with
appropriate parameters for each served shape.

TIA

Stefan





All times are GMT +1. The time now is 02:42 AM.

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