Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default Hide/Show Shapes on Worksheet??

I am trying to create subs to hide or show certain shapes on a worksheet.

When I use the macro recorder to do that, I get this sub:

' Macro11 Macro
' Macro recorded 6/27/2005 by Ken Loomis
'

'
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 8
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.SchemeColor = 8
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
End Sub

So I thought I could use this sub for a specific shape:

Sub HideStudentHoursBubbles()
With ActiveSheet.Shapes("StdntHrsBbl1")
.Fill.Visible = msoFalse
.Fill.Solid
.Fill.Transparency = 0#
.Line.Weight = 0.75
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineSingle
.Line.Transparency = 0#
.Line.Visible = msoFalse
End With
End Sub

This seems to make no change to the shape at all and nothing I try seems toi
have an effect.

Can someone pleae help?

TIA,
Ken Loomis




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Hide/Show Shapes on Worksheet??

Hi Ken,

Try:

ActiveSheet.Shapes("StdntHrsBbl1").Visible = False

---
Regards,
Norman



"Ken Loomis" wrote in message
...
I am trying to create subs to hide or show certain shapes on a worksheet.

When I use the macro recorder to do that, I get this sub:

' Macro11 Macro
' Macro recorded 6/27/2005 by Ken Loomis
'

'
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 8
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.SchemeColor = 8
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
End Sub

So I thought I could use this sub for a specific shape:

Sub HideStudentHoursBubbles()
With ActiveSheet.Shapes("StdntHrsBbl1")
.Fill.Visible = msoFalse
.Fill.Solid
.Fill.Transparency = 0#
.Line.Weight = 0.75
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineSingle
.Line.Transparency = 0#
.Line.Visible = msoFalse
End With
End Sub

This seems to make no change to the shape at all and nothing I try seems
toi have an effect.

Can someone pleae help?

TIA,
Ken Loomis






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default Hide/Show Shapes on Worksheet??

Thanks, Norman. That works great.

Still don't understand why the other code didn't work, but at least I have
something that does work.

Ken


"Norman Jones" wrote in message
...
Hi Ken,

Try:

ActiveSheet.Shapes("StdntHrsBbl1").Visible = False

---
Regards,
Norman



"Ken Loomis" wrote in message
...
I am trying to create subs to hide or show certain shapes on a worksheet.

When I use the macro recorder to do that, I get this sub:

' Macro11 Macro
' Macro recorded 6/27/2005 by Ken Loomis
'

'
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 8
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.SchemeColor = 8
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
End Sub

So I thought I could use this sub for a specific shape:

Sub HideStudentHoursBubbles()
With ActiveSheet.Shapes("StdntHrsBbl1")
.Fill.Visible = msoFalse
.Fill.Solid
.Fill.Transparency = 0#
.Line.Weight = 0.75
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineSingle
.Line.Transparency = 0#
.Line.Visible = msoFalse
End With
End Sub

This seems to make no change to the shape at all and nothing I try seems
toi have an effect.

Can someone pleae help?

TIA,
Ken Loomis








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
Command Button to show/hide a different worksheet Marilyn Excel Discussion (Misc queries) 1 April 22nd 09 03:37 AM
Can I lock a worksheet and still be able to hide and show groups? Ryan Excel Discussion (Misc queries) 2 September 6th 08 12:13 AM
Show or Hide a worksheet with a macro Hasty Excel Discussion (Misc queries) 4 February 16th 06 08:54 PM
Hide/show worksheet Mal Excel Discussion (Misc queries) 5 March 29th 05 04:00 PM
protect workbook and allow hide/show worksheet tango Excel Programming 1 October 19th 04 03:18 AM


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