Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have this code...but I need to edit this code so the Insert Picture
Dialog box comes up and the user finds the picture...not how it currently reads...this would automatically put a picture in without a users choice.... Sub Macro1() ' ' Macro1 Macro ' Macro recorded 4/26/2007 ' ' Range("O3").Select Range("O3").AddComment Range("O3").Comment.Visible = False Range("O3").Comment.Text Text:="meps2_spokane:" & Chr(10) & "" Selection.ShapeRange.Line.Weight = 0.75 Selection.ShapeRange.Line.DashStyle = msoLineSolid Selection.ShapeRange.Line.Style = msoLineSingle Selection.ShapeRange.Line.Transparency = 0# Selection.ShapeRange.Line.Visible = msoTrue Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0, 0) Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255) Selection.ShapeRange.Fill.Visible = msoTrue Selection.ShapeRange.Fill.ForeColor.RGB = RGB(255, 255, 255) Selection.ShapeRange.Fill.BackColor.SchemeColor = 80 Selection.ShapeRange.Fill.Transparency = 0# Selection.ShapeRange.Fill.UserPicture "C:\Galleries\Main Gallery \Pict0225.JPG" *****Here is where I need the user to choose, not this pic????******** Selection.ShapeRange.ScaleWidth 0.29, msoFalse, msoScaleFromTopLeft Selection.ShapeRange.ScaleHeight 0.47, msoFalse, msoScaleFromTopLeft End Sub Any help is appreciated, thank you. Bull |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
fname = Application.GetOpenFilename()
Selection.ShapeRange.Fill.UserPicture fName see help on GetOpenFilename for addtional arguments also you can add some if statements to test what the user has chosen before you try to use it with the UserPicture command. -- Regards, Tom Ogilvy "Bull" wrote: I have this code...but I need to edit this code so the Insert Picture Dialog box comes up and the user finds the picture...not how it currently reads...this would automatically put a picture in without a users choice.... Sub Macro1() ' ' Macro1 Macro ' Macro recorded 4/26/2007 ' ' Range("O3").Select Range("O3").AddComment Range("O3").Comment.Visible = False Range("O3").Comment.Text Text:="meps2_spokane:" & Chr(10) & "" Selection.ShapeRange.Line.Weight = 0.75 Selection.ShapeRange.Line.DashStyle = msoLineSolid Selection.ShapeRange.Line.Style = msoLineSingle Selection.ShapeRange.Line.Transparency = 0# Selection.ShapeRange.Line.Visible = msoTrue Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0, 0) Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255) Selection.ShapeRange.Fill.Visible = msoTrue Selection.ShapeRange.Fill.ForeColor.RGB = RGB(255, 255, 255) Selection.ShapeRange.Fill.BackColor.SchemeColor = 80 Selection.ShapeRange.Fill.Transparency = 0# Selection.ShapeRange.Fill.UserPicture "C:\Galleries\Main Gallery \Pict0225.JPG" *****Here is where I need the user to choose, not this pic????******** Selection.ShapeRange.ScaleWidth 0.29, msoFalse, msoScaleFromTopLeft Selection.ShapeRange.ScaleHeight 0.47, msoFalse, msoScaleFromTopLeft End Sub Any help is appreciated, thank you. Bull |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Data validation list decreases as the user chooses from the list/s | Excel Discussion (Misc queries) | |||
Add User to comment | Excel Discussion (Misc queries) | |||
Subtotal formulas that chooses values | Excel Discussion (Misc queries) | |||
How do I insert a comment when the Insert:Comment menu is greyed? | Excel Discussion (Misc queries) | |||
how do I insert a function that chooses between two text values? | Excel Worksheet Functions |