Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help with pictures in excel

Hello,
I have been reading posts here for several weeks and I am amazed at the
vast wealth of knowledge out there about Excel (some of you have such
great websites...!!!). I have used Excel for years and only recently
decided to try to learn VBA. I was wondering if someone out there
could possibly help me with a problem? I have a project where I would
like to have several pictures that will be available in all the
workbooks created from my template that can be opened either in a
userform or on a worksheet and can be "annotated". Essentially, I want
the user to be able to draw on the picture and "save it" to the
worksheet.

I need to keep the pictures somewhere (I thought to have them on the
worksheet in layers and hidden but I would prefer not to keep all the
pictures on each workbook that is created from the template, I would
rather just call/create the one or two that each "user" will need in
that workbook) then programmatically make them visible when called and
open the drawing toolbar.

The problem I have is two-fold:
how to position the pictures so that they will appear in the same
place no matter who opens the program (I would prefer to have them open
relative to a certain cell on the sheet) and
how to make them hidden and then visible.

I know how to do this on a userform but I don't know how to do it on
the worksheet. I have combed the 'net to see how to draw on the
picture on a userform but the only reference I could find showed a
macro that, while it does it well on the userform itself, was unable to
draw on an image on the userform and it was also quite limited on what
type of drawing could be done.

Does anyone know how to accomplish any/all of what I am asking? I
would very much appreciate the help.
Thanks,
Michelle

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Help with pictures in excel

Here are 2 routines to toggle the shapes on and off. I got some
routines for positioning them but do not have time to find them right
now. The basic logic is to paste them at "a1" and then increment
them down based on looping through the other shapes n the sheet and
moving down past them.

Look up .TopLeftCell (for placement relative to a cell) and .Height
(as in ActiveSheet.Shapes("test").Height) in Help will probably get you
there. Otherwise re-post and I will dig the stuff up.

Shapes are a little funny so here's how you toggle them:

Sub TurnOnShapes()
Dim shp As Shape

With ActiveSheet
For Each shp In .Shapes
.Shapes(shp.Name).Visible = True
Next shp
End With

End Sub

Sub TurnOffShapes()
Dim shp As Shape

ActiveSheet.Shapes.SelectAll
Selection.Visible = False

End Sub


Good luck and happy programming

LooneyTunes

wrote:
Hello,
I have been reading posts here for several weeks and I am amazed at the
vast wealth of knowledge out there about Excel (some of you have such
great websites...!!!). I have used Excel for years and only recently
decided to try to learn VBA. I was wondering if someone out there
could possibly help me with a problem? I have a project where I would
like to have several pictures that will be available in all the
workbooks created from my template that can be opened either in a
userform or on a worksheet and can be "annotated". Essentially, I want
the user to be able to draw on the picture and "save it" to the
worksheet.

I need to keep the pictures somewhere (I thought to have them on the
worksheet in layers and hidden but I would prefer not to keep all the
pictures on each workbook that is created from the template, I would
rather just call/create the one or two that each "user" will need in
that workbook) then programmatically make them visible when called and
open the drawing toolbar.

The problem I have is two-fold:
how to position the pictures so that they will appear in the same
place no matter who opens the program (I would prefer to have them open
relative to a certain cell on the sheet) and
how to make them hidden and then visible.

I know how to do this on a userform but I don't know how to do it on
the worksheet. I have combed the 'net to see how to draw on the
picture on a userform but the only reference I could find showed a
macro that, while it does it well on the userform itself, was unable to
draw on an image on the userform and it was also quite limited on what
type of drawing could be done.

Does anyone know how to accomplish any/all of what I am asking? I
would very much appreciate the help.
Thanks,
Michelle


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help with pictures in excel

Thank you very much, this is just the help I needed. Have a good
night!
Michelle

LooneyTunes wrote:
Here are 2 routines to toggle the shapes on and off. I got some
routines for positioning them but do not have time to find them right
now. The basic logic is to paste them at "a1" and then increment
them down based on looping through the other shapes n the sheet and
moving down past them.

Look up .TopLeftCell (for placement relative to a cell) and .Height
(as in ActiveSheet.Shapes("test").Height) in Help will probably get you
there. Otherwise re-post and I will dig the stuff up.

Shapes are a little funny so here's how you toggle them:

Sub TurnOnShapes()
Dim shp As Shape

With ActiveSheet
For Each shp In .Shapes
.Shapes(shp.Name).Visible = True
Next shp
End With

End Sub

Sub TurnOffShapes()
Dim shp As Shape

ActiveSheet.Shapes.SelectAll
Selection.Visible = False

End Sub


Good luck and happy programming

LooneyTunes

wrote:
Hello,
I have been reading posts here for several weeks and I am amazed at the
vast wealth of knowledge out there about Excel (some of you have such
great websites...!!!). I have used Excel for years and only recently
decided to try to learn VBA. I was wondering if someone out there
could possibly help me with a problem? I have a project where I would
like to have several pictures that will be available in all the
workbooks created from my template that can be opened either in a
userform or on a worksheet and can be "annotated". Essentially, I want
the user to be able to draw on the picture and "save it" to the
worksheet.

I need to keep the pictures somewhere (I thought to have them on the
worksheet in layers and hidden but I would prefer not to keep all the
pictures on each workbook that is created from the template, I would
rather just call/create the one or two that each "user" will need in
that workbook) then programmatically make them visible when called and
open the drawing toolbar.

The problem I have is two-fold:
how to position the pictures so that they will appear in the same
place no matter who opens the program (I would prefer to have them open
relative to a certain cell on the sheet) and
how to make them hidden and then visible.

I know how to do this on a userform but I don't know how to do it on
the worksheet. I have combed the 'net to see how to draw on the
picture on a userform but the only reference I could find showed a
macro that, while it does it well on the userform itself, was unable to
draw on an image on the userform and it was also quite limited on what
type of drawing could be done.

Does anyone know how to accomplish any/all of what I am asking? I
would very much appreciate the help.
Thanks,
Michelle


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 you export pictures from my pictures file into a word docu Becky New Users to Excel 1 November 20th 09 07:02 PM
Storing Clip Art pictures in My Pictures folder jfg Excel Discussion (Misc queries) 4 August 10th 07 06:12 AM
Pictures.Visible question (after adding many pictures, they stop disappearing) Abe[_4_] Excel Programming 2 July 11th 06 05:02 AM
Pictures in Excel nat22 Excel Programming 1 June 29th 06 09:01 PM
Excel's Compress Pictures or deleting pictures doesn't seem work guidod Excel Discussion (Misc queries) 1 January 29th 06 06:51 AM


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