Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Macro for variable picture

....
Sheets("Actions").Select
Range("B16").Select
sImageToLoad = Sheets("Macros").Range("A2")
ActiveSheet.Pictures.Insert (sImageToLoad)
ActiveSheet.Shapes ("Picture 37")
Selection.ShapeRange.ScaleWidth 1.34, msoFalse,
msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1.34, msoFalse,
msoScaleFromTopLeft
....

I need help with the proper format to make "Picture 37" a variable in
the function. Each time this step is run in large macro, the picture
number changes.

Many thanks in advance.
_Nate
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Macro for variable picture


PictureNumber = 137
PictureName = "Picture " & PictureNumber

Sheets("Actions").Select
Range("B16").Select
sImageToLoad = Sheets("Macros").Range("A2")
ActiveSheet.Pictures.Insert (sImageToLoad)
ActiveSheet.Shapes (PictureName)
Selection.ShapeRange.ScaleWidth 1.34, msoFalse,
msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1.34, msoFalse,
msoScaleFromTopLeft


"_Nate" wrote:

....
Sheets("Actions").Select
Range("B16").Select
sImageToLoad = Sheets("Macros").Range("A2")
ActiveSheet.Pictures.Insert (sImageToLoad)
ActiveSheet.Shapes ("Picture 37")
Selection.ShapeRange.ScaleWidth 1.34, msoFalse,
msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1.34, msoFalse,
msoScaleFromTopLeft
....

I need help with the proper format to make "Picture 37" a variable in
the function. Each time this step is run in large macro, the picture
number changes.

Many thanks in advance.
_Nate

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
Insert, position, and resize a picture w/ Macro John Excel Discussion (Misc queries) 1 July 10th 07 07:21 PM
Macro to enlarge a picture WightRob Excel Discussion (Misc queries) 10 June 7th 06 07:08 AM
delete picture with macro Steve Excel Discussion (Misc queries) 1 March 16th 06 10:12 PM
Position Picture with macro G Setting up and Configuration of Excel 1 November 28th 05 07:25 PM
Copying as Picture Link - using Macro Kamal Excel Discussion (Misc queries) 3 June 30th 05 12:07 AM


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