LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Method Range of object '_Global' failed

this worked for me:

Sub ABC()
Set ObjExcelRep = ActiveWorkbook
intCellIndexRow = 5
MonthNoOfDays = Day(DateSerial( _
Year(Date), Month(Date) + 1, 0))
ObjExcelRep.Activate
ObjExcelRep.Worksheets("DataMatrix").Select
ObjExcelRep.Worksheets("DataMatrix") _
.Cells(intCellIndexRow, 1) = Month(Date) & "/01/" _
& Year(Date)
ObjExcelRep.Worksheets("DataMatrix") _
.Cells(intCellIndexRow, 1).Select
strRange = "A" & intCellIndexRow & ":A" & _
intCellIndexRow + MonthNoOfDays - 1
Selection.AutoFill Destination:=Range(strRange), _
Type:=xlFillDays


End Sub

--
Regards,
Tom Ogilvy

"maverick2005"
wrote in message
news:maverick2005.1ubmqj_1124975155.7962@excelforu m-nospam.com...

I tried this
Range("A" & intCellIndexRow).AutoFill
Destination:=objExcelRep1.Worksheets("DataMatrix") .Range(strRange),
Type:=xlFillDays

and still it throws me the same "_global" error.

Thanks,
John


--
maverick2005
------------------------------------------------------------------------
maverick2005's Profile:

http://www.excelforum.com/member.php...o&userid=26627
View this thread: http://www.excelforum.com/showthread...hreadid=399026



 
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
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 error Ken Loomis Excel Programming 2 October 12th 04 01:29 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 09:47 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"