Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi
I work in a hospital and am trying to automate the production of waiting lists from an Access table, imported into a separate Excel workbook for each month. I'm stuck on how to name each workbook sequentially within the macro. The convention will be: 0701Wl.xls for Jan 2007 0702Wl.xls for Feb 2007 etc Can anyone advise me how to do this please? Many thanks GLS |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Dim WkbkName as string
dim someDate as date somedate = dateserial(2007,11,14) 'any day in November wkbkname = format(somedate, "YYMM") & "W1.xls" GLS wrote: Hi I work in a hospital and am trying to automate the production of waiting lists from an Access table, imported into a separate Excel workbook for each month. I'm stuck on how to name each workbook sequentially within the macro. The convention will be: 0701Wl.xls for Jan 2007 0702Wl.xls for Feb 2007 etc Can anyone advise me how to do this please? Many thanks GLS -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks Dave - that worked great.
-- GLS "Dave Peterson" wrote: Dim WkbkName as string dim someDate as date somedate = dateserial(2007,11,14) 'any day in November wkbkname = format(somedate, "YYMM") & "W1.xls" GLS wrote: Hi I work in a hospital and am trying to automate the production of waiting lists from an Access table, imported into a separate Excel workbook for each month. I'm stuck on how to name each workbook sequentially within the macro. The convention will be: 0701Wl.xls for Jan 2007 0702Wl.xls for Feb 2007 etc Can anyone advise me how to do this please? Many thanks GLS -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using a macro to create a macro in another workbook | Excel Worksheet Functions | |||
excel loads another workbook to run the macro... | Excel Discussion (Misc queries) | |||
Closing File Error | Excel Discussion (Misc queries) | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) | |||
Stubborn toolbars in Excel | Excel Discussion (Misc queries) |