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: 1
Default Method 'Range' of object '_Global' failed


I have a macro which must run when the excel document is opened. The
macro formats the pre-existing excel sheet. In my 'ThisWorkbook' I have
the following code

Private Sub Workbook_Open()
Call Rolling25Months
End Sub

and the Rolling25Months has the following code


Sub Rolling25Months()

Application.ScreenUpdating = False

Dim cTitle

Range("E2:M2").Select

With Selection
..HorizontalAlignment = xlGeneral
..VerticalAlignment = xlBottom
..WrapText = False
..Orientation = 0
..AddIndent = False
..ShrinkToFit = False
..MergeCells = True
End With
ActiveWindow.LargeScroll ToRight:=1
ActiveWindow.LargeScroll Down:=1
Range("AA43").Select
Selection.Copy
ActiveWindow.LargeScroll Down:=-1
ActiveWindow.LargeScroll ToRight:=-1
Range("E2:M2").Select
ActiveSheet.Paste

etc etc............................

Application.ScreenUpdating = True

End Sub


I get the error on this line:

Range("E2:M2").Select

Any ideas on what I am doing wrong will be greatly appreciated!

Thanks in advance.


--
fundoo_pc
------------------------------------------------------------------------
fundoo_pc's Profile: http://www.excelforum.com/member.php...o&userid=30535
View this thread: http://www.excelforum.com/showthread...hreadid=501867

 
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
Method 'Range' of object '_global' failed higherlimits Excel Discussion (Misc queries) 3 June 23rd 06 06:16 PM
Method Range of object '_Global' failed maverick2005 Excel Programming 3 August 25th 05 02:56 PM
What does XLS VB Method 'Range of object' _Global failed mean? DCMKGG Excel Programming 2 February 25th 05 03:06 PM
Method 'Range' of object '_Global' failed Brian Morris[_2_] Excel Programming 1 December 10th 03 11:04 PM
Method 'Range' of object '_Global' failed Mohanasundaram[_2_] Excel Programming 1 August 25th 03 01:43 PM


All times are GMT +1. The time now is 10:22 AM.

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"