View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
patrick molloy patrick molloy is offline
external usenet poster
 
Posts: 391
Default getopenfilename in access

to a form, add a Common Dialog Control. Then add a
button. Use the click event on the button to show the
controls "Open" method or "SaveAs" method ...

Private Sub Command0_Click()
Dim fn As String
On Error GoTo trap
With CommonDialog1
.CancelError = True
.ShowOpen
fn = ""
fn = .FileName

End With
Exit Sub

trap:
' cancel clicked

End Sub



Patrick Molloy
Microsoft Excel MVP



-----Original Message-----
Hello,

I have a problem with access. I have used a subroutine

from excel that
uses the getopenfilename control. In acces it won't

work. Does anybody
have a solution.

Regards,
Niek


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

.