Can anyone see where this simple as macro went wrong?
![]()
Sub Macro1() ActiveWorkbook.Range(.Cells(12, (2 * 3)), .Cells(14, (2 * 3))).Activate End Sub
Can anyone see where this simple as macro went wrong?
![]()
Sub Macro1() ActiveWorkbook.Range(.Cells(12, (2 * 3)), .Cells(14, (2 * 3))).Activate End Sub
dots in front of .Cells
they would be needed in case of
![]()
With someobject your instruction end with
Best Regards,
Kaper
Hi
What do you want to do?
not use .Cells, correctand what?![]()
Cells
![]()
(2 * 3)
"No xadrez nem sempre a menor dist?ncia entre dois pontos ? uma linha reta" G. Kasparov.
If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select b from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.
Thanks for the comments guys. I tried two options which neither worked:
and then this which gave me an 'objcet doesn't supported property or method:![]()
Sub Macro1() With ActiveWorkbook .Range(.Cells(12, (2 * 3)), .Cells(14, (2 * 3))).Activate End With End Sub
![]()
Sub Macro1() ActiveWorkbook.Range(Cells(12, (2 * 3)), Cells(14, (2 * 3))).Activate End Sub
A workbook doesn't have a Cells property.
Which worksheet are the cells you want to select on?
If posting code please use code tags, see here.
A workbook doesn't have a Cells property.
Which worksheet are the cells you want to select on?
They are on the active worksheet.
Try this.![]()
With ActiveWorkbook.ActiveSheet .Range(.Cells(12, (2 * 3)), .Cells(14, (2 * 3))).Activate End With
Almost! I would like to select two cells but not the one inbetween that I would like to see not selected.
Try:
PS. Where were my eyes, that I've not noticed that no sheet was specified few posts up :-(![]()
With ActiveWorkbook.ActiveSheet Union(.Cells(12, (2 * 3)), .Cells(14, (2 * 3))).Activate End With
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks