Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Opening a file with changing dates


I want to open a file which has a filename ABC followed by anything. I
thought this should have worked, but it is not.

Set Wkb2 = Workbooks.Open(Filename:=foldername & "\ABC*")

Can someone please correct it? Thanks in advance


--
kingkdz
------------------------------------------------------------------------
kingkdz's Profile: http://www.excelforum.com/member.php...o&userid=35783
View this thread: http://www.excelforum.com/showthread...hreadid=555483

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Opening a file with changing dates

fName = Dir(foldername & "\ABC*")
if fName < "" Then
Set Wkb2 = Workbooks.Open(Filename:=fName)
End If


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"kingkdz" wrote in
message ...

I want to open a file which has a filename ABC followed by anything. I
thought this should have worked, but it is not.

Set Wkb2 = Workbooks.Open(Filename:=foldername & "\ABC*")

Can someone please correct it? Thanks in advance


--
kingkdz
------------------------------------------------------------------------
kingkdz's Profile:

http://www.excelforum.com/member.php...o&userid=35783
View this thread: http://www.excelforum.com/showthread...hreadid=555483



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Opening a file with changing dates


Thanks. But it is still saying file not found while the file it is
quoting as not found is right there in the folder!! Weird.


--
kingkdz
------------------------------------------------------------------------
kingkdz's Profile: http://www.excelforum.com/member.php...o&userid=35783
View this thread: http://www.excelforum.com/showthread...hreadid=555483

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Opening a file with changing dates


Anyone has an alternative to this? Please

--
kingkd
-----------------------------------------------------------------------
kingkdz's Profile: http://www.excelforum.com/member.php...fo&userid=3578
View this thread: http://www.excelforum.com/showthread.php?threadid=55548

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
Changing Opening folder Blair Excel Worksheet Functions 2 July 1st 06 05:04 PM
opening an excel file opens a duplicate file of the same file skm Excel Discussion (Misc queries) 1 December 7th 05 05:52 PM
Opening a file that changes dates Michael from Austin Excel Programming 2 October 7th 05 03:33 PM
Stop Excel from changing numbers to dates in CSV file Curt L. Excel Discussion (Misc queries) 2 June 7th 05 12:23 AM
Opening Excel after changing settings and add-ins swesterm Excel Discussion (Misc queries) 3 December 29th 04 06:54 PM


All times are GMT +1. The time now is 08:03 AM.

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"