Consulting

Results 1 to 5 of 5

Thread: rename sheet and first row.

  1. #1

    rename sheet and first row.

    I think this will be an easy macro for someone to create I am just running out of time to research because my boss has me wanting to complete ten task at once.
    If anyone wants to help I would very much appreciate it.

    I need vba code to rename the sheet to "input" and also row one to match the below. They need to be two separate macros. I need to name thesheet before my other macros run then I need to name the rows after the othermacros run. I already have 8 macros to run with this but they require the sheet and row one to be named correctly. I have just been doing it manually. I am creating this so when I leave this job others will be able to complete the task with as lite steps as possible.

    I need row one to be


    1. Invoice Date
    2. Invoice Number
    3. Account Name
    4. Item
    5. Qty

    H) Discount Price
    I) line class
    J) class

    K) template

    again thanks
    Last edited by joeny0706; 02-15-2019 at 09:50 AM.

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,724
    Location
    Option Explicit
    
    Sub RenameActivesheet()
        ActiveSheet.Name = "Input"
    End Sub
    
    
    Sub AddRow1()
        With Worksheets("Input")
            .Range("A1").Value = "Invoice Date"
            .Range("B1").Value = "Invoice Number"
            .Range("C1").Value = "Account Name"
            .Range("D1").Value = "Item"
            .Range("E1").Value = "Qty"
            
            .Range("H1").Value = "Discount Price"
            .Range("I1").Value = "line class"
            .Range("J1").Value = "class"
            .Range("K1").Value = "template"
        End With
    End Sub
    

    Although if it were me and I was planning to turn it over to someone else, I'd integrate all the macros into a single one that did the entire task instead of running a number of macros
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  3. #3
    I do have one macro that just runs the list. So they onlyneed to click run on the runall macro and it does all the others. I have notyet tried to combine them all into one yet but I might with time.

    Again thanks for the help and I will let you know how itworks out.

  4. #4
    It worked perfect thanks again

  5. #5
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,724
    Location
    Quote Originally Posted by joeny0706 View Post
    It worked perfect thanks again
    I'm glad

    You can mark yout thread [SOLVED] by using Thread Tools above your first post
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

Posting Permissions

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