Hope that someone can help,
I've go a spreadsheet where I enter information for specific product to serve as a sale's sheet.
The spreadsheet also contains a Macro Button (called "Insert Picture") that opens a folder so that I can select a picture to insert on my spreadsheet in the B8 cell.
The problem that I have is that when I click the button, it opens a different folder whereas I need it to open as specific picture folder "L:\Pics".
Does anybody know how I can modify the code so that it always opens my Picture folder ?
Here is the current code:
Sub Insert_N_Pict()
Dim oPict, PictObj
Dim sImgFileFormat As String
Dim rPictCell As Range
Dim iAns As Integer
sImgFileFormat = "jpg Files (*.jpg), *.jpg, bmp (*.bmp),*.bmp,tif (*.tif),*tif"
ActiveSheet.Range("B8").Select
GetPict:
oPict = Application.GetOpenFilename(sImgFileFormat)
If oPict = False Then End
iAns = MsgBox("Open : " & oPict, vbYesNo, "Insert Picture")
If iAns = vbNo Then GoTo GetPict
Set PictObj = ActiveSheet.Pictures.Insert(oPict)
With PictObj
.ShapeRange.LockAspectRatio = msoTrue
.ShapeRange.Height = 255#
End With
Set PictObj = Nothing
Set rPictCell = Nothing
End Sub
Thanks for any help
Bookmarks