ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   changing active cell (https://www.excelbanter.com/excel-programming/326550-changing-active-cell.html)

Doug

changing active cell
 
Can I move the active cell around in VBA like I use to do in Lotus? ie up3,
right7 etc



Stuart[_21_]

changing active cell
 
Perhaps ActiveCell.Offset(-3, 7) ?

Regards.

"doug" wrote in message
...
Can I move the active cell around in VBA like I use to do in Lotus? ie
up3,
right7 etc





Doug

changing active cell
 
Thanks but that returns a compile/syntax error.

"Stuart" wrote:

Perhaps ActiveCell.Offset(-3, 7) ?

Regards.

"doug" wrote in message
...
Can I move the active cell around in VBA like I use to do in Lotus? ie
up3,
right7 etc






Stuart[_21_]

changing active cell
 
Perhaps you might care to show the code which produces
this error, then?

"doug" wrote in message
...
Thanks but that returns a compile/syntax error.

"Stuart" wrote:

Perhaps ActiveCell.Offset(-3, 7) ?

Regards.

"doug" wrote in message
...
Can I move the active cell around in VBA like I use to do in Lotus? ie
up3,
right7 etc








macgru

changing active cell
 

Użytkownik "doug" napisał w wiadomości
...
Thanks but that returns a compile/syntax error.

"Stuart" wrote:

Perhaps ActiveCell.Offset(-3, 7) ?

Regards.

"doug" wrote in message
...
Can I move the active cell around in VBA like I use to do in Lotus? ie
up3,
right7 etc





maybe ActiveCell.Offset(-3, 7) goes out of spredsheet?
mcg




Doug

changing active cell
 
Starting at cell L51, the first line works good when alone,


Selection.EntireRow.Insert
ActiveCell.Offset(0,-3)


"Stuart" wrote:

Perhaps you might care to show the code which produces
this error, then?

"doug" wrote in message
...
Thanks but that returns a compile/syntax error.

"Stuart" wrote:

Perhaps ActiveCell.Offset(-3, 7) ?

Regards.

"doug" wrote in message
...
Can I move the active cell around in VBA like I use to do in Lotus? ie
up3,
right7 etc









Tom Ogilvy

changing active cell
 
Selection.EntireRow.Insert
ActiveCell.Offset(0,-3).Select

but hopefully you will give up this approach and learn how to program in
VBA -- which doesn't mimic cursoring around the worksheet.

--
Regards,
Tom Ogilvy

"doug" wrote in message
...
Starting at cell L51, the first line works good when alone,


Selection.EntireRow.Insert
ActiveCell.Offset(0,-3)


"Stuart" wrote:

Perhaps you might care to show the code which produces
this error, then?

"doug" wrote in message
...
Thanks but that returns a compile/syntax error.

"Stuart" wrote:

Perhaps ActiveCell.Offset(-3, 7) ?

Regards.

"doug" wrote in message
...
Can I move the active cell around in VBA like I use to do in Lotus?

ie
up3,
right7 etc











Doug

changing active cell
 
I thought that was what I was doing. What would the VBA code be to insert a
row and be positioned in the A column of that row from anywhere in the
worksheet?

"Tom Ogilvy" wrote:

Selection.EntireRow.Insert
ActiveCell.Offset(0,-3).Select

but hopefully you will give up this approach and learn how to program in
VBA -- which doesn't mimic cursoring around the worksheet.

--
Regards,
Tom Ogilvy

"doug" wrote in message
...
Starting at cell L51, the first line works good when alone,


Selection.EntireRow.Insert
ActiveCell.Offset(0,-3)


"Stuart" wrote:

Perhaps you might care to show the code which produces
this error, then?

"doug" wrote in message
...
Thanks but that returns a compile/syntax error.

"Stuart" wrote:

Perhaps ActiveCell.Offset(-3, 7) ?

Regards.

"doug" wrote in message
...
Can I move the active cell around in VBA like I use to do in Lotus?

ie
up3,
right7 etc












Tom Ogilvy

changing active cell
 
Sub aa()
Rows(ActiveCell.Row).Insert
Cells(ActiveCell.Row, 1).Select
End Sub


--
Regards,
Tom Ogilvy



"doug" wrote in message
...
I thought that was what I was doing. What would the VBA code be to insert

a
row and be positioned in the A column of that row from anywhere in the
worksheet?

"Tom Ogilvy" wrote:

Selection.EntireRow.Insert
ActiveCell.Offset(0,-3).Select

but hopefully you will give up this approach and learn how to program in
VBA -- which doesn't mimic cursoring around the worksheet.

--
Regards,
Tom Ogilvy

"doug" wrote in message
...
Starting at cell L51, the first line works good when alone,


Selection.EntireRow.Insert
ActiveCell.Offset(0,-3)


"Stuart" wrote:

Perhaps you might care to show the code which produces
this error, then?

"doug" wrote in message
...
Thanks but that returns a compile/syntax error.

"Stuart" wrote:

Perhaps ActiveCell.Offset(-3, 7) ?

Regards.

"doug" wrote in message
...
Can I move the active cell around in VBA like I use to do in

Lotus?
ie
up3,
right7 etc















All times are GMT +1. The time now is 07:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com