Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default User prompted date to open file

Hi, I have code to open yesterday's file from scheduled reports but I need
one where the user can enter the date of the file they require to open.

The current code is:-
basename = "Report15DetailProbability"
yesterday = Format(Date - 1, "yyyymmdd")
NewName = basename & yesterday

'
ChDir "Z:\"
Workbooks.Open Filename:="Z:\" & NewName & ".csv"
Would an inputbox do this.

Thanks in advance.

Davie
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default User prompted date to open file

basename = "Report15DetailProbability"
inputDate = InputBox("Enter date", , Format(Date, "yyyymmdd"))
NewName = basename & inputDate

MsgBox "Z:\" & NewName & ".csv"

"davethewelder" wrote:

Hi, I have code to open yesterday's file from scheduled reports but I need
one where the user can enter the date of the file they require to open.

The current code is:-
basename = "Report15DetailProbability"
yesterday = Format(Date - 1, "yyyymmdd")
NewName = basename & yesterday

'
ChDir "Z:\"
Workbooks.Open Filename:="Z:\" & NewName & ".csv"
Would an inputbox do this.

Thanks in advance.

Davie

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default User prompted date to open file

Mike, worked a treat. Thanks a lot.

Davie

"Mike" wrote:

basename = "Report15DetailProbability"
inputDate = InputBox("Enter date", , Format(Date, "yyyymmdd"))
NewName = basename & inputDate

MsgBox "Z:\" & NewName & ".csv"

"davethewelder" wrote:

Hi, I have code to open yesterday's file from scheduled reports but I need
one where the user can enter the date of the file they require to open.

The current code is:-
basename = "Report15DetailProbability"
yesterday = Format(Date - 1, "yyyymmdd")
NewName = basename & yesterday

'
ChDir "Z:\"
Workbooks.Open Filename:="Z:\" & NewName & ".csv"
Would an inputbox do this.

Thanks in advance.

Davie

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
User is not prompted to update links when opening spreadsheet Wendy Excel Worksheet Functions 2 September 12th 08 09:57 PM
User replaces existing file with blank during file open sjs Excel Discussion (Misc queries) 3 August 18th 08 06:16 PM
User not being prompted to enter Password to modify Excel 2003 kmorl Excel Discussion (Misc queries) 2 October 20th 06 05:32 PM
not being prompted that user has file open maryj Excel Discussion (Misc queries) 0 December 15th 05 03:10 PM


All times are GMT +1. The time now is 02:54 AM.

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"