Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Doc Doc is offline
external usenet poster
 
Posts: 2
Default Creative graphics

Good Evening Y'all,

My problem is trivial. I am submitting it with the hope of learning some
coding techniques.

I have a WordArt object on a worksheet. When the object is made visible,
its transparency is 0%. I keep it in view for 10 seconds and then would
like the background to appear to fade away with the text unchanged. The
problem is that the fading is not smooth. Each transparency change,
regardless of how much (in my case 10%), remains visible for approximately 1
second before changing again until the transparency is at 100% when I hide
the object.

Is there any way of changing my code to make the transparency changes smooth
? I suspect the 1 second delay is the time Excel requires to refresh the
WordArt object on the display. While on the subject, what is the code, if
any, to fade the text only and leave the background unchanged ? I could
only find code to change the font name, size, bold or italics.

The macro recorder did not even recognize selecting the WordArt object.
Google and Bing helped with the background transparency but not the text
transparency.

Here is my code snippet:

Dim ViewReminder As Shape
Dim Start As Double, Dimmer As Double
Set ViewReminder = ActiveSheet.Shapes("ScreenMessageBox")
With ViewReminder
.Fill.Transparency = 0
.Visible = True
End With
Start = Timer
Do While Timer < Start + 10
DoEvents
Loop
' Begin fade
For Dimmer = 0 To 1 Step 0.1
ViewReminder.Fill.Transparency = Dimmer ' <--- Each change is visible
'
for about 1 second
DoEvents
Next Dimmer
With ViewReminder
.Visible = False
.Fill.Transparency = 0
End With

Thank you to all interested.

Doc

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Creative graphics

You can do something like this on the shape


myshape.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)

For i = 0 To 200 Step 5 'Can go to 255
Debug.Print i
myshape.TextFrame.TextRange.Font.Color.RGB = RGB(i, i, i)
Next i


"Doc" wrote:

Good Evening Y'all,

My problem is trivial. I am submitting it with the hope of learning some
coding techniques.

I have a WordArt object on a worksheet. When the object is made visible,
its transparency is 0%. I keep it in view for 10 seconds and then would
like the background to appear to fade away with the text unchanged. The
problem is that the fading is not smooth. Each transparency change,
regardless of how much (in my case 10%), remains visible for approximately 1
second before changing again until the transparency is at 100% when I hide
the object.

Is there any way of changing my code to make the transparency changes smooth
? I suspect the 1 second delay is the time Excel requires to refresh the
WordArt object on the display. While on the subject, what is the code, if
any, to fade the text only and leave the background unchanged ? I could
only find code to change the font name, size, bold or italics.

The macro recorder did not even recognize selecting the WordArt object.
Google and Bing helped with the background transparency but not the text
transparency.

Here is my code snippet:

Dim ViewReminder As Shape
Dim Start As Double, Dimmer As Double
Set ViewReminder = ActiveSheet.Shapes("ScreenMessageBox")
With ViewReminder
.Fill.Transparency = 0
.Visible = True
End With
Start = Timer
Do While Timer < Start + 10
DoEvents
Loop
' Begin fade
For Dimmer = 0 To 1 Step 0.1
ViewReminder.Fill.Transparency = Dimmer ' <--- Each change is visible
'
for about 1 second
DoEvents
Next Dimmer
With ViewReminder
.Visible = False
.Fill.Transparency = 0
End With

Thank you to all interested.

Doc

  #3   Report Post  
Posted to microsoft.public.excel.programming
Doc Doc is offline
external usenet poster
 
Posts: 2
Default Creative graphics

Barb,

Thank you for the immediate reply.
The line
myshape.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)
caused an error 438: Object doesn't support this Property or Method.
Your suggestion caused me to relook at the font transparency issue.
Why I found it now and not yesterday is ..... sleep deprivation, that's it.

The font transparency code is
myshape.TextFrame2.TextRange.Font.Fill.Transparenc y = 0.8 ' 0 to 1

When placed in my code, the font transparency change is the same as the
background.
It takes about 1 second for each change.

I got your routine to work. It will change the color of the text from black
to white but not the transparency. Interestingly, the font color change
(like you suggested) is smooth. I did need to add a 'DoEvents after setting
the RGB color.

This is what I have found:
myshape.Fill.Transparency = # (# is 0 to 1) ' Changes background
transparency
myshape.TextFrame2.TextRange.Font.Fill.Transparenc y = # (# is 0 to 1) '
Changes font transparency
myshape.TextFrame2.TextRange.Font.Fill.ForeColor.R GB = RGB(#, #, #) ' (#
is 0 to 255) Changes font color

I appreciate your suggestion. It has lead to determining the code to change
the font transparency. My desire to make the transparency changes smooth is
purely for aesthetics. I'm sure I will go on to live another day if I don't
solve it.

Thanks again.

Doc

"Barb Reinhardt" wrote in message
...
You can do something like this on the shape


myshape.TextFrame.TextRange.Font.Color.RGB = RGB(0, 0, 0)

For i = 0 To 200 Step 5 'Can go to 255
Debug.Print i
myshape.TextFrame.TextRange.Font.Color.RGB = RGB(i, i, i)
Next i


"Doc" wrote:

Good Evening Y'all,

My problem is trivial. I am submitting it with the hope of learning some
coding techniques.

I have a WordArt object on a worksheet. When the object is made visible,
its transparency is 0%. I keep it in view for 10 seconds and then would
like the background to appear to fade away with the text unchanged. The
problem is that the fading is not smooth. Each transparency change,
regardless of how much (in my case 10%), remains visible for
approximately 1
second before changing again until the transparency is at 100% when I
hide
the object.

Is there any way of changing my code to make the transparency changes
smooth
? I suspect the 1 second delay is the time Excel requires to refresh the
WordArt object on the display. While on the subject, what is the code,
if
any, to fade the text only and leave the background unchanged ? I could
only find code to change the font name, size, bold or italics.

The macro recorder did not even recognize selecting the WordArt object.
Google and Bing helped with the background transparency but not the text
transparency.

Here is my code snippet:

Dim ViewReminder As Shape
Dim Start As Double, Dimmer As Double
Set ViewReminder = ActiveSheet.Shapes("ScreenMessageBox")
With ViewReminder
.Fill.Transparency = 0
.Visible = True
End With
Start = Timer
Do While Timer < Start + 10
DoEvents
Loop
' Begin fade
For Dimmer = 0 To 1 Step 0.1
ViewReminder.Fill.Transparency = Dimmer ' <--- Each change is visible
'
for about 1 second
DoEvents
Next Dimmer
With ViewReminder
.Visible = False
.Fill.Transparency = 0
End With

Thank you to all interested.

Doc


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
Getting Creative Gordon[_2_] Excel Programming 3 April 5th 09 07:27 PM
Creative Ways to use Versioning or Tracking in Excel atlcharm Excel Discussion (Misc queries) 0 March 3rd 08 06:17 AM
creative solutions wanted! No coding involved (yet) .... Ray Excel Programming 0 August 8th 07 01:26 PM
Looking for a creative sol'n to sales region map Sprite8 Excel Discussion (Misc queries) 1 January 3rd 06 02:40 PM
Thorny VBA problem. Any creative solution appreciated. [email protected] Excel Programming 3 February 21st 05 09:23 AM


All times are GMT +1. The time now is 11:44 PM.

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"