+ Reply to Thread
Results 1 to 8 of 8

help with macro for naming tab, and moving it to the begining

  1. #1
    Registered User
    Join Date
    01-22-2014
    Location
    Potosi, MO
    MS-Off Ver
    Excel 2013
    Posts
    64

    Question help with macro for naming tab, and moving it to the begining

    I have the code below to add my new sheet and give it todays date (coming from the menu sheet). However I can not figure out how to add the before code so it will save the new sheet at the beginning of all of the sheets every time. Can anyone help?

    thanks,


    Please Login or Register  to view this content.

  2. #2
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: help with macro for naming tab, and moving it to the begining

    give this a try

    Please Login or Register  to view this content.
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

  3. #3
    Registered User
    Join Date
    01-22-2014
    Location
    Potosi, MO
    MS-Off Ver
    Excel 2013
    Posts
    64

    Re: help with macro for naming tab, and moving it to the begining

    That gives me an error. Could it be because I do not have a sheet called sheet1? Is there a generic way to say =beginning or something of the sort?

  4. #4
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: help with macro for naming tab, and moving it to the begining

    actually this takes the active sheet and moves it to the 1st sheet...it doesn't go by "Sheets1"....Sheet(1) is the 1st sheet....can you delete all your data and just send the macro-enabled file so I can see what is going on?....thanks

  5. #5
    Registered User
    Join Date
    01-22-2014
    Location
    Potosi, MO
    MS-Off Ver
    Excel 2013
    Posts
    64

    Re: help with macro for naming tab, and moving it to the begining

    The code that you gave me seems to be working. It does put the sheet at the beginning, but instead of continuing the macro..(which is some copy, paste stuff) it gives an error. Almost like it doesn't know to use the current sheet or something. It works fine without the move sheet code. Its odd.

  6. #6
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: help with macro for naming tab, and moving it to the begining

    can you step through the code and see which line errors?

  7. #7
    Registered User
    Join Date
    01-22-2014
    Location
    Potosi, MO
    MS-Off Ver
    Excel 2013
    Posts
    64

    Re: help with macro for naming tab, and moving it to the begining

    I just got it to work. Dummy me, I simply moved your bit of code to the end of the macro, and it works fine. It didn't matter when it moved it, as long as it moved it... so all is good now. Thanks so much for your help!

  8. #8
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: help with macro for naming tab, and moving it to the begining

    I'm glad you got it all worked out....

+ 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] Make Macro to find next same cell then hide untill begining.
    By Anto_BT in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-25-2015, 05:42 PM
  2. [SOLVED] Question about re-naming and moving linked workbooks
    By Yoshi64 in forum Excel General
    Replies: 3
    Last Post: 01-19-2014, 01:52 AM
  3. [SOLVED] Sum without putting at the begining + or =
    By gastonpresente in forum Excel General
    Replies: 11
    Last Post: 12-12-2013, 08:42 PM
  4. [SOLVED] Naming sheets from cell and moving data
    By Gwendly in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-31-2013, 11:09 PM
  5. naming a range begining with a number?
    By kriminaal in forum Excel General
    Replies: 2
    Last Post: 01-22-2009, 05:11 PM

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