Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Picture scroll with active cell

Hi Everyone
I've taken John McGimpsey's code and modified then for my needs.
What I'm trying to do is, have the picture follow along with the active cell.
I 've got a list of names from B3:B62 and D3:D62 that matches a picture.
Now the picture are staying at the top, and would like them to scroll down with
the selection.
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim oPic As Picture
Me.Pictures.Visible = False
For Each oPic In Me.Pictures
If oPic.Name = ActiveCell.Text Then
oPic.Visible = True
" This line not working " oPic.Top = ActiveCell.Offset(3, 3)
oPic.Left = 600
Exit For
End If
Next oPic
End Sub

Hope someone can help me
Regards
John

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Picture scroll with active cell

I have not worked with picture objects, but have you tried using the TopLeft
property? It might do what you want. Check it out in VBA help.


"John" wrote in message
...
Hi Everyone
I've taken John McGimpsey's code and modified then for my needs.
What I'm trying to do is, have the picture follow along with the active
cell.
I 've got a list of names from B3:B62 and D3:D62 that matches a picture.
Now the picture are staying at the top, and would like them to scroll down
with the selection.
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim oPic As Picture
Me.Pictures.Visible = False
For Each oPic In Me.Pictures
If oPic.Name = ActiveCell.Text Then
oPic.Visible = True
" This line not working " oPic.Top = ActiveCell.Offset(3, 3)
oPic.Left = 600
Exit For
End If
Next oPic
End Sub

Hope someone can help me
Regards
John



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Picture scroll with active cell

Hi JLGWhiz
Thanks for your help, i tried it out but can't get it to work. I don't know
anough about VBA.
Regards
John
"JLGWhiz" wrote in message
...
I have not worked with picture objects, but have you tried using the TopLeft
property? It might do what you want. Check it out in VBA help.


"John" wrote in message
...
Hi Everyone
I've taken John McGimpsey's code and modified then for my needs.
What I'm trying to do is, have the picture follow along with the active cell.
I 've got a list of names from B3:B62 and D3:D62 that matches a picture.
Now the picture are staying at the top, and would like them to scroll down
with the selection.
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim oPic As Picture
Me.Pictures.Visible = False
For Each oPic In Me.Pictures
If oPic.Name = ActiveCell.Text Then
oPic.Visible = True
" This line not working " oPic.Top = ActiveCell.Offset(3, 3)
oPic.Left = 600
Exit For
End If
Next oPic
End Sub

Hope someone can help me
Regards
John




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Picture scroll with active cell

Hi Everyone
Does anyone have any ideas, anything I could try.
Plus does anyone know how many Pictures can be used, It seem to stop at 62.
Regards
John
"John" wrote in message
...
Hi Everyone
I've taken John McGimpsey's code and modified then for my needs.
What I'm trying to do is, have the picture follow along with the active cell.
I 've got a list of names from B3:B62 and D3:D62 that matches a picture.
Now the picture are staying at the top, and would like them to scroll down
with the selection.
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim oPic As Picture
Me.Pictures.Visible = False
For Each oPic In Me.Pictures
If oPic.Name = ActiveCell.Text Then
oPic.Visible = True
" This line not working " oPic.Top = ActiveCell.Offset(3, 3)
oPic.Left = 600
Exit For
End If
Next oPic
End Sub

Hope someone can help me
Regards
John


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
Display picture according to active cell omega Excel Programming 0 January 24th 09 02:15 AM
Active Cell will not scroll to next cell CBDave Excel Discussion (Misc queries) 2 October 15th 07 04:45 PM
Screen does not scroll as active cell moves down the page KimC Excel Discussion (Misc queries) 3 May 8th 07 06:45 PM
Picture in Cell of Active Sheet Sige Excel Programming 4 September 29th 05 05:35 PM
Cursor keys move active cell or scroll screen, how do I select whi Rob Croft Excel Discussion (Misc queries) 1 June 18th 05 11:51 PM


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