Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default CallByName in Excel for Fill object

Thank you very much for your time and help.

I am trying to access the Fill object in Excel, by its name.

The object is instancenable, becuse the the following command works.

Set o1 = Excel.ActiveWorkbook.Sheets(1).Shapes(1).Fill

How the command below returns the error 438 - object does not support this
property or method.

Set o2 = Excel.ActiveWorkbook.Sheets(1).Shapes(1)
Set o3 = CallByName(o2, "Fill", VbGet, Empty)

Can you please help me resolve this problem or find a work around?

Thank you very much for your help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default CallByName in Excel for Fill object

This worked for me -

Set o2 = Excel.ActiveWorkbook.Sheets(1).Shapes(1)
Set o3 = CallByName(o2, "Fill", VbGet)

MsgBox TypeName(o3) ' FillFormat

as did -

Set o3 = o2.Fill

Regards,
Peter T

"bv0001" wrote in message
...
Thank you very much for your time and help.

I am trying to access the Fill object in Excel, by its name.

The object is instancenable, becuse the the following command works.

Set o1 = Excel.ActiveWorkbook.Sheets(1).Shapes(1).Fill

How the command below returns the error 438 - object does not support this
property or method.

Set o2 = Excel.ActiveWorkbook.Sheets(1).Shapes(1)
Set o3 = CallByName(o2, "Fill", VbGet, Empty)

Can you please help me resolve this problem or find a work around?

Thank you very much for your help.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default CallByName in Excel for Fill object

Dear Peter thank you very, very much!

"Peter T" wrote:

This worked for me -

Set o2 = Excel.ActiveWorkbook.Sheets(1).Shapes(1)
Set o3 = CallByName(o2, "Fill", VbGet)

MsgBox TypeName(o3) ' FillFormat

as did -

Set o3 = o2.Fill

Regards,
Peter T

"bv0001" wrote in message
...
Thank you very much for your time and help.

I am trying to access the Fill object in Excel, by its name.

The object is instancenable, becuse the the following command works.

Set o1 = Excel.ActiveWorkbook.Sheets(1).Shapes(1).Fill

How the command below returns the error 438 - object does not support this
property or method.

Set o2 = Excel.ActiveWorkbook.Sheets(1).Shapes(1)
Set o3 = CallByName(o2, "Fill", VbGet, Empty)

Can you please help me resolve this problem or find a work around?

Thank you very much for your help.




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
Camera Object - how to set default Fill = Transparent Jimbo213 Excel Discussion (Misc queries) 2 June 12th 08 07:06 PM
Example for VBA function - CallByname! HaHa Excel Discussion (Misc queries) 0 November 11th 06 05:04 PM
callbyname in XL 2K and XL 2003 Doug Glancy[_6_] Excel Programming 1 December 14th 05 06:42 AM
Confusion about how the Window object fits into the Excel object model Josh Sale Excel Programming 11 April 15th 05 06:08 PM
Using CallByName for conversion function Nacho Nachev Excel Programming 3 October 26th 04 05:44 PM


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