LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default Problems Adding Columns--but data close to IV and no hidden objects

Hello,
I have a problem similar to that in the thread "Problems deleting
columns" on Jul. 2. The recommendations, and resolution at
http://support.microsoft.com/default.aspx?kbid=211769 do not work in
my case. My sheet will probably contain up to cols. DD or EE, but
will never go to IV. There is no data in IV. However, I have
inserted conditional formatting and have filled rows/columns. I
continue to get the run-time error 1004 "To prevent the possible loss
of data, Microsoft Excel cannot shift nonblank cells off the
worksheet..." error. This is stumping me; any ideas?

Thanks,
Arnold

Sub mcrActivities()

Sheets("Fields").Select

Dim ActivityDate As Range
Set ActivityDate = ActiveSheet.Range("C11")
ActivityDate.Value = Date

Columns("C:C").Select
Selection.Copy
Sheets("Quarter").Select
lastcolumn = ActiveSheet.Cells.Find(what:="Activity",
searchorder:=xlByColumns, searchdirection:=xlPrevious).Column
ActiveSheet.Cells(lastcolumn + 1).Offset(12, 0).Select

' Modified code to place new columns in front of the last column
with the text "Activity" in it on row 12; in the AAs.

ActiveSheet.Cells(lastcolumn).Offset(0, 0).EntireColumn.Insert

' Code to place the focus after a column insert.

ActiveSheet.Cells(lastcolumn).Offset(8, 0).Select

End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chart data from hidden rows (not columns) wildetudor Charts and Charting in Excel 1 January 13th 09 03:52 PM
Prevent other users seeing hidden columns/data Mouettes Excel Discussion (Misc queries) 3 December 13th 07 11:14 AM
Pasting data with hidden columns shark1966 Excel Worksheet Functions 4 November 4th 06 04:00 AM
Adding specific objects based on data... Kay Excel Discussion (Misc queries) 2 July 14th 05 09:28 AM
Close Hidden Data Sheet Jeff Excel Programming 7 January 8th 05 09:48 PM


All times are GMT +1. The time now is 01:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"