Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 573
Default Which is unsupported?

Simple code:
Sub CRSPPPMod()
Dim Wksht As Worksheet
Call Clean
Set Wksht = ActiveSheet
Wksht("Sheet1").Range("A8:AE1000").Select<----ERROR
Selection.UnMerge

End Sub

Getting an "object does not support this property or method" error at
marked line. I checked the Object Browser. I think it says that a
worksheet can have a range, and a range can be selected. So how am I
misinterpreting the OB?
Thanks in advance.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Which is unsupported?

You cannot select a range on a sheet that is not the active
sheet. You must select the worksheet first, then select the
range. E.g.,

Worksheets("Sheet1").Select
Range("A8:AE1000").Select


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"davegb" wrote in message
oups.com...
Simple code:
Sub CRSPPPMod()
Dim Wksht As Worksheet
Call Clean
Set Wksht = ActiveSheet
Wksht("Sheet1").Range("A8:AE1000").Select<----ERROR
Selection.UnMerge

End Sub

Getting an "object does not support this property or method"
error at
marked line. I checked the Object Browser. I think it says that
a
worksheet can have a range, and a range can be selected. So how
am I
misinterpreting the OB?
Thanks in advance.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default Which is unsupported?

You have declared the object variable Wksht and then set it to the
activesheet so you don't need the sheet name anymo

Set Wksht = ActiveSheet
Wksht.Range("A8:AE1000").Select
Selection.UnMerge

Regards
Rowan

davegb wrote:
Simple code:
Sub CRSPPPMod()
Dim Wksht As Worksheet
Call Clean
Set Wksht = ActiveSheet
Wksht("Sheet1").Range("A8:AE1000").Select<----ERROR
Selection.UnMerge

End Sub

Getting an "object does not support this property or method" error at
marked line. I checked the Object Browser. I think it says that a
worksheet can have a range, and a range can be selected. So how am I
misinterpreting the OB?
Thanks in advance.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 573
Default Which is unsupported?

Thanks to you both!

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default Which is unsupported?

You're welcome.

davegb wrote:
Thanks to you both!



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
Unsupported methods for XL macro in IE Jean-Yves[_2_] Excel Programming 0 August 20th 04 03:34 PM
Unsupported object or method... mjack003[_12_] Excel Programming 2 February 10th 04 06:57 PM


All times are GMT +1. The time now is 11:29 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"