Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Import Data with the filename coming from inputbox ?

Anyone has a marco that could help me to import the Data with the filename
coming from a inputbox ? The Data file and the excel file is in the same
folder. My excel already has a function to open new workbook and the data is
to be loaded into the new work book. Everything is good except the part of
calling the data file with the file name coming from the inputbox.

Do i need to change the string to text ??

Any marcos that could help ??

Thanx in advance !@~!!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Import Data with the filename coming from inputbox ?

try this if the other file is in the same folder

Public Sub test()
Dim file As String
file = InputBox("type the name of the file with extension")
Workbooks.Open (file)

End Sub
if the file is in the same folder it is enough to give input only finlename
and extension otherwise the whole path.

Iceage wrote in message
...
Anyone has a marco that could help me to import the Data with the filename
coming from a inputbox ? The Data file and the excel file is in the same
folder. My excel already has a function to open new workbook and the data

is
to be loaded into the new work book. Everything is good except the part of
calling the data file with the file name coming from the inputbox.

Do i need to change the string to text ??

Any marcos that could help ??

Thanx in advance !@~!!



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
Not all data coming through in Excel viewer pwhitley Excel Discussion (Misc queries) 1 May 14th 08 08:46 PM
Coming up with all possible combinations that add to a certain sumwithin a set of data Zarlot Excel Discussion (Misc queries) 1 December 20th 07 07:02 PM
Filename import CiceroCF Excel Discussion (Misc queries) 4 January 4th 06 01:54 PM
How to import a path/filename when importing data into an XML list cxparker Excel Worksheet Functions 0 December 7th 04 10:13 PM
Saving filename same as import filename Matt Excel Programming 4 February 24th 04 03:01 PM


All times are GMT +1. The time now is 01:04 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"