PC Review


Reply
Thread Tools Rate Thread

CallByName in Excel for Fill object

 
 
=?Utf-8?B?YnYwMDAx?=
Guest
Posts: n/a
 
      25th Oct 2006
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 With Quote
 
 
 
 
Peter T
Guest
Posts: n/a
 
      25th Oct 2006
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" <(E-Mail Removed)> wrote in message
news:37224D2B-DE53-4130-9DF7-(E-Mail Removed)...
> 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 With Quote
 
=?Utf-8?B?YnYwMDAx?=
Guest
Posts: n/a
 
      26th Oct 2006
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" <(E-Mail Removed)> wrote in message
> news:37224D2B-DE53-4130-9DF7-(E-Mail Removed)...
> > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing object fill pattern in Excel =?Utf-8?B?dGhlQnJ1Y2VHdXk=?= Microsoft Access Reports 0 20th Jul 2007 10:32 PM
Object reference not set to an instance of an object for data table fill Chuck Gantz Microsoft VB .NET 2 29th Oct 2005 08:10 PM
Line Fill and Object Fill =?Utf-8?B?am8=?= Microsoft Word Document Management 1 6th May 2004 10:32 AM
Using CallByName with asp.net Olivier Microsoft ASP .NET 2 11th Mar 2004 05:28 PM
"Object reference not set to an intance of an object." when attempting to fill my dataset R. G. Microsoft ADO .NET 5 25th Nov 2003 12:30 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:13 PM.