Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: EXCEL VBA 2007 Macro: Offsetting cell form a user defined selection

12 Jul 2011   #1

Windows XP
 
 
EXCEL VBA 2007 Macro: Offsetting cell form a user defined selection

Hello
I am writing a line of code as part of a more complex program that is not working correctly. I am new to VBA so please bear with me...

Essentially, I am prompting the user to select a cell which is then assigned to 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 [Not the same location]), 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?


My System SpecsSystem Spec
.

Reply

 EXCEL VBA 2007 Macro: Offsetting cell form a user defined selection




Thread Tools



Similar help and support threads for2: EXCEL VBA 2007 Macro: Offsetting cell form a user defined selection
Thread Forum
Excel cell Microsoft Office
Excel Macro Microsoft Office
Excel 2010 Multiply cell Microsoft Office
Excel 2007 Home and Studentl: calculation results in blank cell Microsoft Office
EXCEL VBA Macro Sort Groups of Items Microsoft Office
Excel 2003 Macro Help? Microsoft Office
uac crashes excel macro Microsoft Office

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 03:46 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33