Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
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
Loading File in Excel 2007 Robert Bradley Excel Discussion (Misc queries) 1 April 1st 08 01:44 PM
File Loading Problems Jason Hancock Excel Programming 1 June 30th 04 03:14 AM
File Loading Problem Jason Hancock Excel Programming 1 June 20th 04 08:53 PM
Loading an Excel file Kevin Sprinkel Excel Programming 0 February 6th 04 04:46 PM
Loading text file Clayton L. Wilson Excel Programming 3 July 22nd 03 03:28 PM


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