LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default On-the-fly determination of object type?

I like to use the CopyAsPicture function. Unfortunately (at least in
XL2000), I need to code in the correct object type. I have
Dim rng As Range
Set rng = Selection
rng.CopyPicture xlPrinter, xlPicture
but that won't work for graphics or charts. Then I tried removing "As
Range" to make a general variable, but that still won't work on everything.

Is there any way I can maybe do something like:
Dim var
Set var = Selection
Obj$ = var.Type
Dim obj As Obj$
Set obj = var
obj.CopyPicture xlPrinter, xlPicture

Ed


 
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
coefficient of determination Jene Excel Worksheet Functions 2 August 27th 09 02:39 AM
Average determination Debra Excel Worksheet Functions 4 November 1st 04 01:22 PM
automation object type library reference Kevan Hanson Excel Programming 2 August 4th 04 02:29 AM
Combination Determination? Jeffrey Marcellus Excel Programming 1 June 3rd 04 03:41 AM
How to find what object type is returned from Selection property ? Krzysztof Klimczak[_3_] Excel Programming 1 October 2nd 03 11:33 PM


All times are GMT +1. The time now is 09:45 AM.

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

About Us

"It's about Microsoft Excel"