2 Macro Questions

  • Thread starter Thread starter Bob
  • Start date Start date
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
..
..
..
..
 
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
 
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
 
Back
Top