Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening a file
Hi all,
I want a form to pop up asking for a file number, then on clicking OK the file with the number opens e.g File_1. Private Sub EntryButtonP_Click() Dim PeriodFile As String PeriodFile = "File_0405_P" & GetPrevPeriod.PeriodBox Workbooks.Open Filename:="N:\Files\Files 2004-2005 \File_0405\SYSTEMFILES\PREVMON\" & PeriodFile.xls, UpdateLinks:=0 End Sub I've tried putting PeriodFile & xls, and PeriodFile & ".xls", but it doesn't seem to work. Can anyone help. Many thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening a file
Workbooks.Open Filename:="N:\Files\Files 2004-2005" & _
"\File_0405\SYSTEMFILES\PREVMON\" & PeriodFile & _ ".xls", UpdateLinks:=0 -- Regards, Tom Ogilvy "Salo" wrote in message ... Hi all, I want a form to pop up asking for a file number, then on clicking OK the file with the number opens e.g File_1. Private Sub EntryButtonP_Click() Dim PeriodFile As String PeriodFile = "File_0405_P" & GetPrevPeriod.PeriodBox Workbooks.Open Filename:="N:\Files\Files 2004-2005 \File_0405\SYSTEMFILES\PREVMON\" & PeriodFile.xls, UpdateLinks:=0 End Sub I've tried putting PeriodFile & xls, and PeriodFile & ".xls", but it doesn't seem to work. Can anyone help. Many thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
opening a file in Excel starts application but dose not open file | Excel Discussion (Misc queries) | |||
Opening file in Excel 2003 opens multipule instances of same file | Excel Discussion (Misc queries) | |||
File:1 and File:2 -- Double Files when Opening One File | Excel Discussion (Misc queries) | |||
opening an excel file opens a duplicate file of the same file | Excel Discussion (Misc queries) | |||
"Unable to read file" error message when opening a Excel file that contains a PivotTable report. | Charts and Charting in Excel |