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: 27,285
Default Inputbox to enter date

"I:\EXLDATA\Central Analytics Project\Gross Batchtracks by Business
Line\Product Summary\Internal GBT Prod_Sum myValue.xls"


should be

"I:\EXLDATA\Central Analytics Project\Gross Batchtracks by Business
Line\Product Summary\Internal GBT Prod_Sum " & myValue & ".xls"

--
Regards,
Tom Ogilvy

"Hargrove" wrote in message
...
I have the following macro set-up to open 3 files in 3 separate folders.

I would like for the end user to enter the month they want to review so I'm
trying to add an input box that will fill in the date in the 3 file names.
When I run the macro, I get a "Syntax Error" message and I'm not sure how to
fix it.

myValue = InputBox("Enter a date")
Range("A1").Value = Format(myValue, ("yyyy_mm"))

ChDir _
"I:\EXLDATA\Central Analytics Project\Gross Batchtracks by

Business Line\Product Breakdown"
Workbooks.Open Filename:= _
"I:\EXLDATA\Central Analytics Project\Gross Batchtracks by

Business Line\Product Breakdown\Internal GBT Prod_Breakdown myValue.xls" _
, UpdateLinks:=3
ChDir _
"I:\EXLDATA\Central Analytics Project\Gross Batchtracks by

Business Line\Product Summary"
Workbooks.Open Filename:= _
"I:\EXLDATA\Central Analytics Project\Gross Batchtracks by

Business Line\Product Summary\Internal GBT Prod_Sum myValue.xls"
, UpdateLinks:=3
ChDir _
"I:\EXLDATA\Central Analytics Project\Gross Batchtracks by

Business Line\Summary Data"
Workbooks.Open Filename:= _
"I:\EXLDATA\Central Analytics Project\Gross Batchtracks by

Business Line\Summary Data\Internal GBT Summary myValue.xls" _
, UpdateLinks:=3
End Sub



 
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
Auto enter date when data in enter in another cell Brian Excel Worksheet Functions 5 December 7th 06 06:44 PM
Excel: I enter date and format for date, but shows as number spohar Excel Discussion (Misc queries) 2 March 10th 06 08:40 PM
How do I enter a date range ie -7 from current date in MS QUERY notsmartenough Excel Discussion (Misc queries) 1 November 11th 05 10:17 PM
Inputbox as Date andibevan Excel Programming 3 July 9th 04 02:15 PM
Date from InputBox Michael Excel Programming 3 May 26th 04 01:11 PM


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