Shape Marcro with Parameter

S

Stefan Rauchegger

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
 
R

Robin Hammond

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
 
Top