Offseting Cell Selection

Joined
Jul 8, 2011
Messages
3
Reaction score
0
Hello I am writing a line of code as part of a more complex program that is not working correctly.

Essentially I am prompting the user to select a cell which is then assigned the variable celNm.

I then perform the following actions
celNm.EntireRow.Copy
celNm.EntireRow.Insert

Next, for reasons specific to the program (and I am assuming the celNm will be located at the same cell after the command) is I want to move the cell selection upwards, so it is now located at the row just recently copied above. I am using the following line to do this:

celNm.Offset(-1, 0).Select

This, however does not work.

The next step in the program would be to create a list in this location. However the program still creates a list at the previous location (in the cell selected). Why is this?
 
Joined
Sep 3, 2008
Messages
164
Reaction score
5
DJL_DASH,

Can you please provide more information regarding cdlNm; how did you declare the variable?
You can set focus with offset from the current cell; ActiveCell.Offset(-1,0).Select
What code drives the list creation?

Stoneboysteve
 

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