Macro

  • Thread starter Thread starter rn
  • Start date Start date
R

rn

Why would a macro behave differently attached to a command
button than when event driven through calculate worksheet?
 
What does "behave differently" mean to you?

It might help for you to post both a description of what you're
concerned about, and relevant parts of your code in a reply message.

A couple of things different:

Macros in a regular code module may have different default behavior than
macros stored in a worksheet code module - for instance Range("A1") in a
regular code module is equivalent to ActiveSheet.Range("A1"). In a
worksheet module, the default parent object is that worksheet.

In XL97, if you don't set the button's TakeFocusOnClick property to
False, the button can have focus, preventing selections by the macro.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top