+ Reply to Thread
Results 1 to 2 of 2

Name a worksheet using a variable

  1. #1
    Registered User
    Join Date
    01-05-2013
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    31

    Name a worksheet using a variable

    Hi all,

    Part of a macro I'm working on triggers an event which imports a work sheet.
    I could end up with as many as ten worksheets being imported.
    I would like to name each one using a string variable as they are imported.

    I've tried
    Please Login or Register  to view this content.
    where name is my string but weirdly (to me) this names the sheet after my UserForm.

    How can I name it after the contents of my string?

    Many thanks,

    Paul.

  2. #2
    Registered User
    Join Date
    01-05-2013
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Name a worksheet using a variable

    Oops....

    I forgot to dim my variable and put some data in it.....

    worksheet.name = name works...

+ 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