Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I've gotten solutions within a day - it saved a lot of time and actually got me one ATTABOY from my boss..."

Geography

Where in the world do Tek-Tips members come from?

Macro being called by Text Button works, calling it in VBA does not

jim2011 (IS/IT--Management)
29 Jun 12 12:44
I'm trying to program a VBA script to execute a macro from an Excel Plugin (Cognos Analyst). When I use the plugin to assign the macro (Analyst_SaveButton) to a text button, it stores what I assume is the parameter value in the text of that text button. Clicking the button then executes the macro in the external XLA plugin file and succeeds. If I try running the same macro through VBA using Application.Run "Analyst_SaveButton", it does not work. I get a "VB Error 1004 in Anlyst_XLA.Analyst_SaveButton at 110: Unable to get the DrawingOBjects property of the Worksheet class". Is there any way to use VBA to act as if it were the button being clicked when calling the macro?

Thanks,
Jim
SkipVought (Programmer)
29 Jun 12 12:46

...and the code is??????

Skip,

glassesJust traded in my old subtlety...
for a NUANCE!tongue

jim2011 (IS/IT--Management)
2 Jul 12 7:15
That's the problem. The code for the macro is locked behind a password protected XLA file. That's why I want to simulate a textbutton being pressed. The textbutton has no code behind it besides to call the macro in the password protected XLA file. The macro picks up whatever the text is in the Textbutton and uses that as a parameter somehow. Any ideas?
SkipVought (Programmer)
2 Jul 12 8:33
I cannot advise you on a black box, about which I know nothing.

If you want to create you OWN button and macro et al, then that's achievable.

Skip,

glassesJust traded in my old subtlety...
for a NUANCE!tongue

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close