Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Set focus on graphic inserted in worksheet

I have a macro that stacks pictures below each other. The
problem I have is once the pictures extend beyond the
activewindow area I can't figure a way of getting the
screen to scroll or jump to place the most recently added
picture in focus. I don't want the screen to jump each
time an image is added but only "page" down when the most
recent images bottom extends past the view window area.

I have been messing around with determining the row and
column reference for the image that was added but I can't
seem to determine whether the image is off the screen. I
am inserting the images into column A and to top things
off I have merged all the cells in column A so that the
individual cells cannot be selected.

The following doesn't seem to work because I have merged
column A.

CurrRow = ActiveSheet.Shapes("Component1").TopLeftCell.Row
ActiveSheet.Cells(CurrRow, 1).Select
Application.Goto Reference:=Range(ActiveCell.Address),
Scroll:=True
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Set focus on graphic inserted in worksheet

The obvious answer is to unmerge column A.

If you don't want the users to select things on the sheet, lock the cells,
protect the sheet and set the EnableSelection property.

--
Regards,
Tom Ogilvy


"David Cuthill" wrote in message
...
I have a macro that stacks pictures below each other. The
problem I have is once the pictures extend beyond the
activewindow area I can't figure a way of getting the
screen to scroll or jump to place the most recently added
picture in focus. I don't want the screen to jump each
time an image is added but only "page" down when the most
recent images bottom extends past the view window area.

I have been messing around with determining the row and
column reference for the image that was added but I can't
seem to determine whether the image is off the screen. I
am inserting the images into column A and to top things
off I have merged all the cells in column A so that the
individual cells cannot be selected.

The following doesn't seem to work because I have merged
column A.

CurrRow = ActiveSheet.Shapes("Component1").TopLeftCell.Row
ActiveSheet.Cells(CurrRow, 1).Select
Application.Goto Reference:=Range(ActiveCell.Address),
Scroll:=True



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Set focus on graphic inserted in worksheet

That's to easy.

It's alway interesting when I miss the obvious.

Thanks for the help.
-----Original Message-----
The obvious answer is to unmerge column A.

If you don't want the users to select things on the

sheet, lock the cells,
protect the sheet and set the EnableSelection property.

--
Regards,
Tom Ogilvy


"David Cuthill"

wrote in message
...
I have a macro that stacks pictures below each other.

The
problem I have is once the pictures extend beyond the
activewindow area I can't figure a way of getting the
screen to scroll or jump to place the most recently

added
picture in focus. I don't want the screen to jump each
time an image is added but only "page" down when the

most
recent images bottom extends past the view window area.

I have been messing around with determining the row and
column reference for the image that was added but I

can't
seem to determine whether the image is off the screen. I
am inserting the images into column A and to top things
off I have merged all the cells in column A so that the
individual cells cannot be selected.

The following doesn't seem to work because I have merged
column A.

CurrRow = ActiveSheet.Shapes

("Component1").TopLeftCell.Row
ActiveSheet.Cells(CurrRow, 1).Select
Application.Goto Reference:=Range(ActiveCell.Address),
Scroll:=True



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Set focus on graphic inserted in worksheet

Note that the enableselection property is "transient" and you need to set it
each time the workbook is opened - you can do this in the workbook_open
event.

--
Regards,
Tom Ogilvy


"David Cuthill" wrote in message
...
That's to easy.

It's alway interesting when I miss the obvious.

Thanks for the help.
-----Original Message-----
The obvious answer is to unmerge column A.

If you don't want the users to select things on the

sheet, lock the cells,
protect the sheet and set the EnableSelection property.

--
Regards,
Tom Ogilvy


"David Cuthill"

wrote in message
...
I have a macro that stacks pictures below each other.

The
problem I have is once the pictures extend beyond the
activewindow area I can't figure a way of getting the
screen to scroll or jump to place the most recently

added
picture in focus. I don't want the screen to jump each
time an image is added but only "page" down when the

most
recent images bottom extends past the view window area.

I have been messing around with determining the row and
column reference for the image that was added but I

can't
seem to determine whether the image is off the screen. I
am inserting the images into column A and to top things
off I have merged all the cells in column A so that the
individual cells cannot be selected.

The following doesn't seem to work because I have merged
column A.

CurrRow = ActiveSheet.Shapes

("Component1").TopLeftCell.Row
ActiveSheet.Cells(CurrRow, 1).Select
Application.Goto Reference:=Range(ActiveCell.Address),
Scroll:=True



.



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
how do I delete a graphic from a worksheet briadea Excel Discussion (Misc queries) 4 October 30th 08 10:49 PM
On opening a worksheet move focus to a cell based on date davcas Excel Worksheet Functions 1 July 1st 08 02:18 PM
How can I assign a macro to a graphic object on the worksheet bigjim Excel Discussion (Misc queries) 1 March 24th 08 03:08 AM
Using information from one worksheet, to rename inserted worksheet Lyn Excel Worksheet Functions 0 March 24th 06 12:54 AM
Why are my inserted photos out of focus when I open excel? lakrueger Excel Discussion (Misc queries) 0 September 23rd 05 11:07 PM


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