Search : in
By :

VBA macro-move to cell underneath the button

Last answer on Mar 4, 2009 5:51:05 am GMT Alli, on Feb 13, 2009 12:31:28 pm GMT 
 Report this message to moderators

Hello,
I want my VBA macro to move to the cell 'underneath' the particular button that is being pressed. (I have a series of buttons down the page, each will run the same macro / do the same thing, but starting from a different location each time - i.e. starting from where the button is). Any ideas?
Alison

Configuration: Windows Vista
Internet Explorer 7.0

Best answers for « VBA macro move to cell underneath the button » in :
VBA macro to move to the cell 'underneath' Show VBA macro to move to the cell 'underneath' Issue Solution Issue If you need need VBA macro to move to the cell 'underneath' the particular button that is being pressed, series of buttons down the page, each will run the same macro/do...
Excel tips : How to insert date in a cell ShowExcel tips : How to insert date in a cell Below are some tips on how to insert date and time in an excel cell for a specific purpose:- To insert current date, press CTRL ¯+ ;¯ in the chosen cell. To insert current time, press CTRL¯+...
[VBA] Deleting a word in a range of cell Show[VBA] Deleting a word in a range of cell In the case you want to delete a word in a sentence, just create a small macro that removes the word. But it will become difficult when you have word like, for example, "Theword" or "THEWORD" or...
Repainting a cell using excel VBA ShowRepainting a cell using excel VBA Issue Solution Note Issue I am writing a code in excel VBA to generate a report.I am totally new to VBA.Here's my code Private Sub CommandButton1_Click() Dim a1 As Integer Dim d1 As Integer Dim...

1

Helper, on Feb 13, 2009 8:17:39 pm GMT
  • +1

Don't know if this answers your question.
If your button occupies the cells F4:G5, then code your macro to select the cell underneath.

Range("F6").select

Reply to Helper

2

 Ian, on Mar 4, 2009 5:51:05 am GMT
  • +2

Put this code in a macro called by the button

Dim r As Range
Set r = ActiveSheet.Buttons(Application.Caller).TopLeftCell
Range(Cells(r.Row, r.Column), Cells(r.Row, r.Column)).Select

Reply to Ian