+ Reply to Thread
Results 1 to 2 of 2

Week Number and current Hour

  1. #1
    Valued Forum Contributor Macdave_19's Avatar
    Join Date
    03-14-2007
    Location
    Birmingham, England
    MS-Off Ver
    12.0
    Posts
    808

    Week Number and current Hour

    Hi folks,

    im a little stuck as ever!!!

    the following code:

    Please Login or Register  to view this content.
    Basically it gets data from a database, sticks it in excel an renames the sheet, but i want to name the sheet as Follows:

    Wk50Hr12

    So basically the current Week number (50 at present) and the Current Hour (12 at the moment) but i don't know how i can achieve this.

    please help folks!!!

    thanks for reading
    Last edited by VBA Noob; 12-10-2007 at 09:02 AM.
    Mr MaGoo
    Magoo.Inc MMVII

    If i've helped please add to my Rep by Clicking on the Blue Scales in the top right hand corner of the post

  2. #2
    Registered User
    Join Date
    10-25-2006
    Posts
    54
    Hi

    Is the problem renaming the sheet ro getting the hour returned?

    activesheet.name="wk50hr12" will rename the tab OR
    sheets(x).name="wk50hr12" where x is the sheet number

    To get the hour you can use the hour function eg

    this_hour=hour(now)

    this will return an hour integer which you can use in the string for the name.

    A

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1