PC Review


Reply
Thread Tools Rate Thread

Changing format in selected cells (VBA)

 
 
Roderick O'Regan
Guest
Posts: n/a
 
      25th Mar 2004
I've seen many examples of code which insert a table and then change
nominated cells within it.

I've tried modifying these examples so that I can set foreground colours for
selected cells and get all sorts of errors depending on the mistake I made.

I suppose what I want to do say in VBA is: "With the selected cells in the
table turn the foreground colour into a specific RGB". I can manage the RGB
section OK. It's telling VBA how to recognise the selected cells that's the
problem!

Can anyone suggested a snippet of code, please?

Thanks

Roderick O'Regan


 
Reply With Quote
 
 
 
 
Shyam Pillai
Guest
Posts: n/a
 
      26th Mar 2004
Roderick,
Detecting selected cells (PPT 2000 or later) .
http://www.mvps.org/skp/ppttable2.htm

--
Regards
Shyam Pillai

http://www.mvps.org/skp

"Roderick O'Regan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I've seen many examples of code which insert a table and then change
> nominated cells within it.
>
> I've tried modifying these examples so that I can set foreground colours

for
> selected cells and get all sorts of errors depending on the mistake I

made.
>
> I suppose what I want to do say in VBA is: "With the selected cells in the
> table turn the foreground colour into a specific RGB". I can manage the

RGB
> section OK. It's telling VBA how to recognise the selected cells that's

the
> problem!
>
> Can anyone suggested a snippet of code, please?
>
> Thanks
>
> Roderick O'Regan
>
>



 
Reply With Quote
 
Roderick O'Regan
Guest
Posts: n/a
 
      26th Mar 2004
Thanks Shyam for the pointer. However, there seems to be an error in the
code but I havent the ability to spot what it is.

I create a table on a slide (Slide 1) using the Insert|Table command. I
select a couple of cells and then run your code. I get the following error:
<< Shape (unknown member). Invalid request. This shape does not have a table
>> Unfortunately Help is greyed out so that I cannot see what is the

problem.

Also, if I have a table on slide 3 and I select cells there does it do that
table i.e. the active table shape in the active window?

I'm running this on PPoint 2002 and when fixed also in 2000.

Hope you can spot where the challenge exists.

Regards

Roderick O'Regan
"Shyam Pillai" <(E-Mail Removed)> wrote in message
news:%23%(E-Mail Removed)...
> Roderick,
> Detecting selected cells (PPT 2000 or later) .
> http://www.mvps.org/skp/ppttable2.htm
>
> --
> Regards
> Shyam Pillai
>
> http://www.mvps.org/skp
>
> "Roderick O'Regan" <(E-Mail Removed)> wrote in

message
> news:(E-Mail Removed)...
> > I've seen many examples of code which insert a table and then change
> > nominated cells within it.
> >
> > I've tried modifying these examples so that I can set foreground colours

> for
> > selected cells and get all sorts of errors depending on the mistake I

> made.
> >
> > I suppose what I want to do say in VBA is: "With the selected cells in

the
> > table turn the foreground colour into a specific RGB". I can manage the

> RGB
> > section OK. It's telling VBA how to recognise the selected cells that's

> the
> > problem!
> >
> > Can anyone suggested a snippet of code, please?
> >
> > Thanks
> >
> > Roderick O'Regan
> >
> >

>
>



 
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 the default highllight for selected cells? MJK4158 Microsoft Excel Misc 3 23rd Mar 2010 02:23 PM
Excel format in selected cells have changed to DATE format!!!! mybigspamemailaccount@gmail.com Microsoft Excel Discussion 2 4th Feb 2010 03:24 PM
Changing selected cells coloring Karyn Microsoft Excel Misc 0 18th Dec 2007 07:34 PM
changing the way Excel displays selected cells =?Utf-8?B?UCBCb3JpYw==?= Microsoft Excel Misc 1 28th Jul 2005 01:09 PM
Changing selected text format Prosperina Microsoft Excel Worksheet Functions 1 12th Oct 2004 08:07 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:33 PM.