Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i want a click on a table to open another hidden sheet. Wrote the following macro:
ActiveDocument.Sheets("Qualität").Activate
set Q = ActiveDocument.Variables("vAdmin_Themensteuerung")
The first command works but it wont assing 'Q' to the variable.
What am i doing wrong?
Hi tresesco,
yup, that works. I then switched the order to:
set v = ActiveDocument.Variables("vAdmin_Themensteuerung")
v.SetContent "Q", true
ActiveDocument.Sheets("Qualität").Activate
and that works too. Dont know why the order is critical but now it works. Thank You!
Hi are you missing the set bit ie:
Q.SetContent "Q", true
in the code above Q is the variable object in the script not the value.
Hi Steve,
added the line like this:
ActiveDocument.Sheets("Qualität").Activate
set Q = ActiveDocument.Variables("vAdmin_Themensteuerung")
Q.SetContent "Q", true
but it wont work either.
Try with only the bottom two lines. Does it work?
Hi tresesco,
yup, that works. I then switched the order to:
set v = ActiveDocument.Variables("vAdmin_Themensteuerung")
v.SetContent "Q", true
ActiveDocument.Sheets("Qualität").Activate
and that works too. Dont know why the order is critical but now it works. Thank You!