Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    May 2002
    Location
    Wistow, North Yorkshire, England
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Template and saving (2002 SR1)

    I am trying to create a template and I don't know where to go next <img src=/S/confused.gif border=0 alt=confused width=15 height=20>.

    I have created a spreadsheet for my expenses <img src=/S/money.gif border=0 alt=money width=17 height=15> which I complete weekly. What I would like to do is to save each weeks expenses as a new sheet in the same workbook. and when I open the workbook or click a button a new blank expenses form is ready to be filled in.

    Is this possible? If so how do I do it? I have a basic knowledge of excel and VBA

    Thanks

  2. #2
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Template and saving (2002 SR1)

    Graham,

    You need a "template" sheet to start Let's give it a new of Template for the argument sake.

    Then you need a macro to copy that sheet and rename it.
    <pre>'Copy Template sheet and put it after the last sheet
    ActiveWorkbook..Sheets("Template").Copy , Sheets(ActiveWorkbook.Worksheets.Count)

    'Rename the last sheet to Week Number (Number = Sheet count less 1 because of the template)
    ActiveWorkbook.Worksheets(wbk.Worksheets.Count).Na me = _
    "Week " & cstr(ActiveWorkbook.Worksheets(wbk.Worksheets.Coun t)-1)
    </pre>

    HTH,
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  3. #3
    New Lounger
    Join Date
    May 2002
    Location
    Wistow, North Yorkshire, England
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Template and saving (2002 SR1)

    Thats done what I wanted it to
    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •