Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Declear which picture I want to show and not?!


Hi!
Here is same code I have wrote:

Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("B41")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
End Sub

Now all the pictures in the document get invisible!
I want to declear which picture that should be visible or not. Ex. I
want to make picture 1-11 visible = False. How?
How do I decler that a specific picture should be visible, "Picture
101.Visible = True"?

Thanks?


--
petterss
------------------------------------------------------------------------
petterss's Profile: http://www.excelforum.com/member.php...o&userid=36354
View this thread: http://www.excelforum.com/showthread...hreadid=570683

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Declear which picture I want to show and not?!

From your code, you are hiding all pictures. Then making the one that
matches the text visible and moving it over cell B41.
So if you want more pictures visible, you need to test for in your For/Next
loop and set them to .visible=true

Where is you list of pictures to make visible ?

NickHK

"petterss" wrote in
message ...

Hi!
Here is same code I have wrote:

Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("B41")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
End Sub

Now all the pictures in the document get invisible!
I want to declear which picture that should be visible or not. Ex. I
want to make picture 1-11 visible = False. How?
How do I decler that a specific picture should be visible, "Picture
101.Visible = True"?

Thanks?


--
petterss
------------------------------------------------------------------------
petterss's Profile:

http://www.excelforum.com/member.php...o&userid=36354
View this thread: http://www.excelforum.com/showthread...hreadid=570683



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Declear which picture I want to show and not?!


Hi!
The picture I want to be visible are placed in different places in the
document. And in a specific cell I want to show a picture from a list
depending of a choice in an other cell and the other pictures in this
list should be hide.
Can I declear a specific picture to visible? I´m a amateur in VB :) and
would be happy with some excempel!

THanks!

NickHK Wrote:
From your code, you are hiding all pictures. Then making the one that
matches the text visible and moving it over cell B41.
So if you want more pictures visible, you need to test for in your
For/Next
loop and set them to .visible=true

Where is you list of pictures to make visible ?

NickHK

"petterss"
wrote in
message ...

Hi!
Here is same code I have wrote:

Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("B41")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
End Sub

Now all the pictures in the document get invisible!
I want to declear which picture that should be visible or not. Ex. I
want to make picture 1-11 visible = False. How?
How do I decler that a specific picture should be visible, "Picture
101.Visible = True"?

Thanks?


--
petterss

------------------------------------------------------------------------
petterss's Profile:

http://www.excelforum.com/member.php...o&userid=36354
View this thread:

http://www.excelforum.com/showthread...hreadid=570683



--
petterss
------------------------------------------------------------------------
petterss's Profile: http://www.excelforum.com/member.php...o&userid=36354
View this thread: http://www.excelforum.com/showthread...hreadid=570683

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Declear which picture I want to show and not?!

That's what you are doing here.
You are making visible the picture whose .Name matches the .Text in B41.

From your description, I don't see why your code does not do what you need;
hide all except the one with that name.

NickHK

"petterss" wrote in
message ...

Hi!
The picture I want to be visible are placed in different places in the
document. And in a specific cell I want to show a picture from a list
depending of a choice in an other cell and the other pictures in this
list should be hide.
Can I declear a specific picture to visible? I´m a amateur in VB :) and
would be happy with some excempel!

THanks!

NickHK Wrote:
From your code, you are hiding all pictures. Then making the one that
matches the text visible and moving it over cell B41.
So if you want more pictures visible, you need to test for in your
For/Next
loop and set them to .visible=true

Where is you list of pictures to make visible ?

NickHK

"petterss"
wrote in
message ...

Hi!
Here is same code I have wrote:

Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("B41")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
End Sub

Now all the pictures in the document get invisible!
I want to declear which picture that should be visible or not. Ex. I
want to make picture 1-11 visible = False. How?
How do I decler that a specific picture should be visible, "Picture
101.Visible = True"?

Thanks?


--
petterss

------------------------------------------------------------------------
petterss's Profile:

http://www.excelforum.com/member.php...o&userid=36354
View this thread:

http://www.excelforum.com/showthread...hreadid=570683



--
petterss
------------------------------------------------------------------------
petterss's Profile:

http://www.excelforum.com/member.php...o&userid=36354
View this thread: http://www.excelforum.com/showthread...hreadid=570683



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Declear which picture I want to show and not?!


It does, the problem is that it hiding other pictures to(ex one logo
one picture in the Heading). Pictures that dont have anything to d
with the list!
Thats why I want to declear picture 102,103 and 104 to visible!
Is it possible?


NickHK Wrote:
That's what you are doing here.
You are making visible the picture whose .Name matches the .Text i
B41.

From your description, I don't see why your code does not do what yo
need;
hide all except the one with that name.

NickHK

"petterss"
wrote in
message ...

Hi!
The picture I want to be visible are placed in different places i

the
document. And in a specific cell I want to show a picture from

list
depending of a choice in an other cell and the other pictures i

this
list should be hide.
Can I declear a specific picture to visible? I´m a amateur in VB :

and
would be happy with some excempel!

THanks!

NickHK Wrote:
From your code, you are hiding all pictures. Then making the on

that
matches the text visible and moving it over cell B41.
So if you want more pictures visible, you need to test for in your
For/Next
loop and set them to .visible=true

Where is you list of pictures to make visible ?

NickHK

"petterss"
wrote in
messag

...

Hi!
Here is same code I have wrote:

Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("B41")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
End Sub

Now all the pictures in the document get invisible!
I want to declear which picture that should be visible or not

Ex. I
want to make picture 1-11 visible = False. How?
How do I decler that a specific picture should be visible

"Picture
101.Visible = True"?

Thanks?


--
petterss


------------------------------------------------------------------------
petterss's Profile:
http://www.excelforum.com/member.php...o&userid=36354
View this thread:
http://www.excelforum.com/showthread...hreadid=570683



--
petterss


------------------------------------------------------------------------
petterss's Profile:

http://www.excelforum.com/member.php...o&userid=36354
View this thread

http://www.excelforum.com/showthread...hreadid=570683


--
petters
-----------------------------------------------------------------------
petterss's Profile: http://www.excelforum.com/member.php...fo&userid=3635
View this thread: http://www.excelforum.com/showthread.php?threadid=57068



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default Declear which picture I want to show and not?!

Hi,

If you are wanting Picture 102, Picture 103 and Picture 104 to remain
visible at all times then try...

Private Sub Worksheet_Calculate()
Dim oPic As Picture
For Each oPic In Me.Pictures
Select Case oPic.Name
Case "Picture 102", "Picture 103", "Picture 104"
Case Else
oPic.Visible = False
End Select
Next oPic
With Range("B41")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
End Sub

Ken Johnson

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
Declear which picture I want to show and not?! petterss Excel Discussion (Misc queries) 0 August 11th 06 10:35 AM
Declear which picture I want to show and not?! petterss Excel Worksheet Functions 0 August 11th 06 10:31 AM
want to show a picture based on a value Zman Excel Programming 1 April 15th 06 08:33 AM
show and hide a picture A-Design Excel Programming 1 December 3rd 05 08:14 PM
Show picture Ivica Lopar Excel Programming 1 November 18th 05 01:51 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"