View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
bhofsetz[_83_] bhofsetz[_83_] is offline
external usenet poster
 
Posts: 1
Default Macro with manual file selection?


This code should give you what you want.


Code:
--------------------
Sub InsertSelectedPicture()
Dim selFile As String
Dim myDir As String
myDir = "\\Fileserver\otprints"
ChDir (myDir)
selFile = Application.GetOpenFilename("JPG Files (*.jpg),*.jpg,All Files (*.*),*.*")
ActiveSheet.Pictures.Insert (selFile)
End Sub
--------------------


See VBA help to see the different options for the file filter types
that can be used.


--
bhofsetz
------------------------------------------------------------------------
bhofsetz's Profile: http://www.excelforum.com/member.php...o&userid=18807
View this thread: http://www.excelforum.com/showthread...hreadid=381679