Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Loading Data from File ~~!!~~
Hi,
I just can't seems to load the data from a file using macros. Part of my program is below. Basically i just want to use the macro to load a file with the name form the inputbox from the current directory. But i just can't able to do it. I even tried to fix the directory but still invain. Think something wrong with my synatx ??? Anyone able to help ?? MyValue = InputBox(Message, Title, Default) 'For Loading the file If MyValue = "None" Then MyValue = "None" Else 'Edit Sheet Name Sheets("Sheet1").Select Sheets("Sheet1").Name = MyValue MyValue2 = "C:\Project FOM\Excel\" + MyValue + ".dat" Range("B1").Select With ActiveSheet.QueryTables.Add(Constants:= _ MyValue2, Destination:=Range("B1")) .Name = MyValue .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False ...... Thanx in advance !~~ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Loading File in Excel 2007 | Excel Discussion (Misc queries) | |||
File Loading Problems | Excel Programming | |||
File Loading Problem | Excel Programming | |||
Loading an Excel file | Excel Programming | |||
Loading text file | Excel Programming |