Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default excel vba browse file

I am trying to find a way to get a command button in excel to brows
through files so you can pick the file you want to open when you clic
on it

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default excel vba browse file

See Application.GetOpenFilename. E.g.,

Dim FName As Variant
FName = Application.GetOpenFilename("Excel Files (*.xls),*.xls")
If FName = False Then
' user clicked cancel
Else
MsgBox FName
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"jazzy " wrote in message
...
I am trying to find a way to get a command button in excel to

browse
through files so you can pick the file you want to open when

you click
on it.


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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default excel vba browse file

Thank you for tryng to help me but what if the file u want to open i
not an excel file its an access fil

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default excel vba browse file

Try

Dim FName As Variant
FName = Application.GetOpenFilename("All files (*.*),*.*")
If FName = False Then
' user clicked cancel
Else
MsgBox FName
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"jazzy " wrote in message
...
Thank you for tryng to help me but what if the file u want to

open is
not an excel file its an access file


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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Browse File for Mac John Vickers Excel Discussion (Misc queries) 1 February 17th 06 06:23 PM
Excel needs BROWSE in tools-options-general-default file location Homer Setting up and Configuration of Excel 2 November 6th 05 10:46 PM
can't browse file k_anucha Excel Discussion (Misc queries) 1 September 29th 05 01:51 AM
Need to browse 100's of file TITLES in Excel 2000 jeffbro27707 Excel Discussion (Misc queries) 3 May 2nd 05 08:46 PM
File Browse Box JONNIE Excel Programming 2 February 5th 04 05:22 PM


All times are GMT +1. The time now is 04:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"