Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I would like to create a macro that will insert a manually selected image from specific directory using Excell 2002. In other words I would like to be able to execute a macro that will take me to a predetermined directory and will pause for manual selection of an image file. Using the "Record New Macro" function It is easy to set up a macro that will insert the same image over and over again. ActiveSheet.Pictures.Insert("\\Fileserver\otprints \ADV03(LFM-0900,C).jpg"). _ Select End Sub I'm sure what I am trying to do is more complicated then the simple macro above. Can anyone help me out with this? Thank You, Paul -- Pmedina ------------------------------------------------------------------------ Pmedina's Profile: http://www.excelforum.com/member.php...o&userid=24552 View this thread: http://www.excelforum.com/showthread...hreadid=381679 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() bhofsetz, Thanks. You made that look easy. I had no problems using your code. Pau -- Pmedin ----------------------------------------------------------------------- Pmedina's Profile: http://www.excelforum.com/member.php...fo&userid=2455 View this thread: http://www.excelforum.com/showthread.php?threadid=38167 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Manual Selection 1 or the other | Excel Discussion (Misc queries) | |||
Macro resets my calculation to manual | Excel Programming | |||
Need help with macro to save selection to csv file! | Excel Programming | |||
Manual Input During Macro Execution | Excel Programming | |||
Macro vs Manual save event | Excel Programming |