View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
pkohler[_8_] pkohler[_8_] is offline
external usenet poster
 
Posts: 1
Default How do I set a default path when using Application.GetOpenFilename

I am using a macro to help a user put an image into an excel sheet.
would like for the user to be able to click on the button an
automatically be browsing the directory that the excel sheet is in, bu
if not that then I would like to declair a default variable.
Currently, when you click button it defaults to "My Documents". Th
Code Snipit in question is bellow. Any suggestions?

Dim filename As String

filename = Application.GetOpenFilename("Picture
(*.jpg;*.gif;*.bmp), *.jpgs;*.gif;*.bmp", , "Grab Your Logo",
"False")

If filename = "False" Then
Application.ScreenUpdating = True
Call protect
Exit Sub
Else


Thank

--
Message posted from http://www.ExcelForum.com