Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Method selection of object _Global falied

I'm working at VB code
With oWorkSheet
.Range(oWorkSheet.Cells(i, 1), oWorkSheet.Cells(i,MyRange)).Select
With Selection <-- and in this place I obtain error

Method selection of object _Global falied

I declare objects such as oExcel, oWorkBook, oWorkSheet as Object
and then i set'em to appropriate Excel objects.

That kind of behavior I get only in W2K + A2K + E97 enviroment
In WXP + A2K + E2K everything goes ok! :|

Can anyone help me ;)

Thanx in advice, Leon!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Method selection of object _Global falied

I don't speak VB, but how about:

with oExcel.selection

But even better, why not:
with .range(oWorkSheet.Cells(i, 1), oWorkSheet.Cells(i,MyRange))

And drop the selection completely.

Leon wrote:

I'm working at VB code
With oWorkSheet
.Range(oWorkSheet.Cells(i, 1), oWorkSheet.Cells(i,MyRange)).Select
With Selection <-- and in this place I obtain error

Method selection of object _Global falied

I declare objects such as oExcel, oWorkBook, oWorkSheet as Object
and then i set'em to appropriate Excel objects.

That kind of behavior I get only in W2K + A2K + E97 enviroment
In WXP + A2K + E2K everything goes ok! :|

Can anyone help me ;)

Thanx in advice, Leon!


--

Dave Peterson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Method selection of object _Global falied

Leon,

Does MyRange resolve to a Range or an Integer?
For this to work, it should resolve to an Integer.
..Cells(4,7) NOT .Cells(4,"A3:D9")

HTH
Henry


"Leon" wrote in message ...
I'm working at VB code
With oWorkSheet
.Range(oWorkSheet.Cells(i, 1), oWorkSheet.Cells(i,MyRange)).Select
With Selection <-- and in this place I obtain error

Method selection of object _Global falied

I declare objects such as oExcel, oWorkBook, oWorkSheet as Object
and then i set'em to appropriate Excel objects.

That kind of behavior I get only in W2K + A2K + E97 enviroment
In WXP + A2K + E2K everything goes ok! :|

Can anyone help me ;)

Thanx in advice, Leon!




Reply
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 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 12: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"