View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default VB programming interactive macroes

Hi Nils,

Try:

Sub MyTest()
Dim WB As Workbook
Dim fName As Variant

fName = Application.GetOpenFilename()
If Not fName = False Then
Set WB = Workbooks.Open(fName)
Else
'User cancelled
End If
End Sub



---
Regards,
Norman



"Nils Morten" wrote in message
...
I'm programming a little in Visual Basic for Excel 2002
My problem is how to do a interactive VB-macro that open
at specifikk folder, wait for the user to pick the right
file - and then continue the macro whwen this file is ben
chosed.
Can anyone tell me - or give me a sample to use?