LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Define variable from cell to open a file

I have it calling B1

"Amir" wrote:

I am trying to open a file that has a date in its name. EX Data-20070816.csv

I have the user input the date in one cell (a1) and have a string formula in
another cell (b1).

I keep getting an error when I try to define the variable.


Windows("Data Comparison.xls").Activate
Application.Run "BLPLinkReset"
Sheets("Sheet1").Select

Dim Filename As String
Set Filename = Range("B1").Select

Workbooks.Open Filename:="V:\FTP Data\(Filename)"

 
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
Define variable from cell to open a file Jim Thomlinson Excel Programming 0 August 17th 07 01:45 AM
How to define variable kishore Excel Programming 3 May 13th 05 10:22 AM
open file (as variable) from macro d chaps Excel Discussion (Misc queries) 1 March 14th 05 11:57 PM
Syntax to define a variable for current file Mervyn Thomas Excel Programming 2 December 22nd 03 06:01 PM
Using a variable name as part of a file pathname to open many files trickydick Excel Programming 1 December 11th 03 08:10 PM


All times are GMT +1. The time now is 10:31 PM.

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

About Us

"It's about Microsoft Excel"