+ Reply to Thread
Results 1 to 3 of 3

Reference system generated sheet names and change them with VBA

  1. #1
    Forum Contributor
    Join Date
    07-07-2014
    Location
    ericbartha.com
    MS-Off Ver
    2016 Professional
    Posts
    126

    Reference system generated sheet names and change them with VBA

    Hello everyone,

    I tried finding this in the forums, but couldn't find a solution to my specific problem.

    Anyways, I have a VBA script that opens up a workbook, does some formatting and calculations, saves the workbook as a new name and file type and then appends the data into an Access database. This works great except for the sheet names are not always exactly the same. They usually start the same, something like LWDJF102, but will follow with _RANDOM NUMBERS. I want a way to select the sheet name based on the first 8 characters. I tried using

    Sheets("LWDJF019*").Name = "T_019_NonDeliveredShipments"

    but that did not work. Any suggestions!? Thanks!!!
    Last edited by ericbartha; 12-15-2014 at 06:49 PM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: Reference system generated sheet names and change them with VBA

    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Forum Contributor
    Join Date
    07-07-2014
    Location
    ericbartha.com
    MS-Off Ver
    2016 Professional
    Posts
    126

    Re: Reference system generated sheet names and change them with VBA

    Thanks protonLeah!

    I actually just made it work using ActiveSheet.Name = "T_019_NonDeliveredShipments" as there will always only be the one sheet. I came to reply, but you beat me to it!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] System generated forum messages
    By Alf in forum Suggestions for Improvement
    Replies: 3
    Last Post: 01-28-2014, 12:41 AM
  2. Excel sheet names have changed?
    By pauldaddyadams in forum Excel General
    Replies: 4
    Last Post: 10-22-2012, 11:34 AM
  3. Replies: 1
    Last Post: 04-25-2011, 09:19 PM
  4. Code to scrape system generated outlook email doesn't get all the data
    By bobaftt in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-15-2010, 01:57 PM
  5. The columns names on my sheet have changed!!
    By so_moody in forum Excel General
    Replies: 2
    Last Post: 08-15-2005, 08:05 AM

Tags for this Thread

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