2 Macro Questions

B

Bob

If I assign a macro to a forms button on the sheet if I copy the book and
load it on my friends computer do the macros go with them.
Can a macro button be assign to a cell so when clicked it will print (72,8)
from that cell, and what formula would I need?
--
Thanks in advance for your help....Bob Vance
..
..
..
..
 
F

Frank Kabel

Hi Bob
1. Yes, the macro code is copied as well
2. You can add some code to the Doubleclick event of your button. I'm
not so sure what you mean with 'print'? Insert a value in a specific
cell. If yes, try the following code:

Private Sub CommandButton1_Click()
Me.Range("D1").Value = 72.8
End Sub
 
P

Peter Atherton

Bob

Macro are a part of the Workbook and go with the it.

I'm not sure what you mean by the second question but if
you want the cell reference of the active cell use this:

="("&ROW()&","&COLUMN()&")"

Also =ADDRESS(2,24) results in $X$2

Regards
Peter
 

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

Top