#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 122
Default AUTOSHAPE

I have learned from you guys to have a pic become visible depending on a
cells results.

No I need help with an autoshape. I would like to do the same thing as the
pic. exp... If a cell results is x as a result of an if statement I would
like the auto shape to appear on the worksheet at a given cell.

I am a novice so please bear with me.
Thanks a million,
Glenn
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default AUTOSHAPE

I am sure the method would be practically identical, but can't tell you how
to modify something I can't see.

--
Regards,
Tom Ogilvy

"Glenn" wrote in message
...
I have learned from you guys to have a pic become visible depending on a
cells results.

No I need help with an autoshape. I would like to do the same thing as

the
pic. exp... If a cell results is x as a result of an if statement I would
like the auto shape to appear on the worksheet at a given cell.

I am a novice so please bear with me.
Thanks a million,
Glenn



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 122
Default AUTOSHAPE

This is the macro I use to place pics on the worksheet. Please advise me on
what to change to used autoshapes in the same manner.

"Tom Ogilvy" wrote:

I am sure the method would be practically identical, but can't tell you how
to modify something I can't see.

--
Regards,
Tom Ogilvy

"Glenn" wrote in message
...
I have learned from you guys to have a pic become visible depending on a
cells results.

No I need help with an autoshape. I would like to do the same thing as

the
pic. exp... If a cell results is x as a result of an if statement I would
like the auto shape to appear on the worksheet at a given cell.

I am a novice so please bear with me.
Thanks a million,
Glenn




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 122
Default AUTOSHAPE

Forgot to show the prgram...thanks

This is the program I used to place the pics on the worksheet. Please
advise me how to used it for autoshapes.
Option Explicit
Private Sub Worksheet_Calculate()
Dim oPic As Picture
Dim myCell As Range
Dim myRng As Range

Set myRng = Me.Range("K5,L27,O29,Q13,p20,N5,o27")

Me.Pictures.Visible = False
For Each myCell In myRng.Cells
With myCell
For Each oPic In Me.Pictures
If LCase(oPic.Name) = LCase(.Text) Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
End If
Next oPic
End With
Next myCell

End Sub


"Tom Ogilvy" wrote:

I am sure the method would be practically identical, but can't tell you how
to modify something I can't see.

--
Regards,
Tom Ogilvy

"Glenn" wrote in message
...
I have learned from you guys to have a pic become visible depending on a
cells results.

No I need help with an autoshape. I would like to do the same thing as

the
pic. exp... If a cell results is x as a result of an if statement I would
like the auto shape to appear on the worksheet at a given cell.

I am a novice so please bear with me.
Thanks a million,
Glenn




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default AUTOSHAPE

Option Explicit
Private Sub Worksheet_Calculate()
Dim oShp As Shape
Dim myCell As Range
Dim myRng As Range

Set myRng = Me.Range("K5,L27,O29,Q13,p20,N5,o27")
for each oShp in Me.Shapes
if oShp.Type = msoAutoShape then
oShp.Visible = False
end if
Next
For Each myCell In myRng.Cells
With myCell
For Each oShp In Me.Shapes
if oShp.Type = msoAutoShape then
If LCase(oShp.Name) = LCase(.Text) Then
oShp.Visible = True
oShp.Top = .Top
oShp.Left = .Left
End If
End if
Next oShp
End With
Next myCell

End Sub

--
Regards,
Tom Ogilvy


"Glenn" wrote in message
...
Forgot to show the prgram...thanks

This is the program I used to place the pics on the worksheet. Please
advise me how to used it for autoshapes.
Option Explicit
Private Sub Worksheet_Calculate()
Dim oPic As Picture
Dim myCell As Range
Dim myRng As Range

Set myRng = Me.Range("K5,L27,O29,Q13,p20,N5,o27")

Me.Pictures.Visible = False
For Each myCell In myRng.Cells
With myCell
For Each oPic In Me.Pictures
If LCase(oPic.Name) = LCase(.Text) Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
End If
Next oPic
End With
Next myCell

End Sub


"Tom Ogilvy" wrote:

I am sure the method would be practically identical, but can't tell you

how
to modify something I can't see.

--
Regards,
Tom Ogilvy

"Glenn" wrote in message
...
I have learned from you guys to have a pic become visible depending on

a
cells results.

No I need help with an autoshape. I would like to do the same thing

as
the
pic. exp... If a cell results is x as a result of an if statement I

would
like the auto shape to appear on the worksheet at a given cell.

I am a novice so please bear with me.
Thanks a million,
Glenn






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
AutoShape skid812pb Excel Discussion (Misc queries) 6 June 3rd 09 12:44 PM
autoshape tony Excel Discussion (Misc queries) 1 February 24th 07 09:35 PM
Autoshape jackietreehorn Excel Discussion (Misc queries) 2 November 6th 05 07:56 AM
NAME OF AUTOSHAPE Ronbo Excel Discussion (Misc queries) 3 August 18th 05 10:09 PM
autoshape scrabtree[_2_] Excel Programming 1 August 13th 04 01:36 PM


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