PC Review


Reply
Thread Tools Rate Thread

Offseting Cell Selection

 
 
New Member
Join Date: Jul 2011
Posts: 3
 
      12th Jul 2011
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?
 
Reply With Quote
 
 
 
 
Senior Member
Stoneboysteve's Avatar
Join Date: Sep 2008
Location: USA
Posts: 150
 
      13th Jul 2011
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Selection - Paste Selection - Delete Selection Uninvisible Microsoft Excel Programming 2 25th Oct 2007 01:31 PM
Copy Selection - Transpose Selection - Delete Selection Uninvisible Microsoft Excel Misc 2 23rd Oct 2007 04:18 PM
limit cell list selection based on the selection of another list =?Utf-8?B?bG9ycmFpbmU=?= Microsoft Excel Worksheet Functions 2 14th Dec 2004 09:17 PM
Why is Theme offseting info in DWT? John Microsoft Frontpage 1 8th Nov 2004 05:17 AM
offseting formula Daniel Bonallack Microsoft Excel Worksheet Functions 2 8th Oct 2003 06:44 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:26 PM.