I use the follwoing code to open files.
What I require is to only show files called "stations.ODB" not all of
the ODB files.
I have tried altering                  GetOpenFilename("ODB_FILES
(*.ODB),*.ODB")
 
to
                                                GetOpenFilename
("ODB_FILES (stations.ODB),stations.ODB")

But this didn't work.

'*******************************************  code for loading
Stations.odb file ****************************
Private Sub STN_FileOpen()
   Dim varFile As Variant
   Dim counter As Integer
   Dim filename As String
   Excel.Application.DefaultFilePath = "C:\ODB 2 DAT"
   varFile = Application.GetOpenFilename("ODB_FILES (*.ODB),*.ODB")
   Workbooks.Open varFile
   ActiveSheet.Name = "STATIONS"
   filename = varFile
  End Sub

--~--~---------~--~----~------------~-------~--~----~
Visit the blog to download Excel tutorials at 
http://www.excel-macros.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/excel-macros?hl=en

Visit & Join Our Orkut Community at 
http://www.orkut.com/Community.aspx?cmm=22913620

To Learn VBA Macros Please visit http://www.vbamacros.blogspot.com

To see the Daily Excel Tips, Go to:
http://exceldailytip.blogspot.com
 
If you find any spam message in the group, please send an email to Ayush @ 
jainayus...@gmail.com
-~----------~----~----~----~------~----~------~--~---

Reply via email to