+ Reply to Thread
Results 1 to 13 of 13

How to arrange code differently

  1. #1
    Forum Contributor
    Join Date
    10-26-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    133

    How to arrange code differently

    Hello, I have this code and I want to move test 9 so that it runs first. I still want the clear contents to run last though. Could someone please help? Thanks alot
    Sorry the code is long.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: How to arrange code differently

    So why can not you run test9 first then?

    Please Login or Register  to view this content.
    Last edited by AB33; 07-05-2014 at 03:30 PM.

  3. #3
    Forum Contributor
    Join Date
    10-26-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    133

    Re: How to arrange code differently

    Thanks AB33.
    I needed to clear some of the code.
    When I run what you provided sometimes it runs and sometimes it doesnt properly
    would changing the clear contents to the end of the code make a difference?
    Thanks

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: How to arrange code differently

    Which one do you want to clear? Right now, you have this line ONLY

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    10-26-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    133

    Re: How to arrange code differently

    Thats it E18 and E21
    Thanks

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: How to arrange code differently

    Change the last 3 lines in to

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by AB33; 07-05-2014 at 05:07 PM.

  7. #7
    Forum Contributor
    Join Date
    10-26-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    133

    Re: How to arrange code differently

    Thanks AB33

    I tried the code and sub test 9 does not add data to sheet cabinet total and does not clear contents E18 and E21

    I would like to remove clear content from sub test9 and put it at the very end of the code so that it runs last. I just don't know how to structure it so that it works.

    Thanks

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: How to arrange code differently

    Which sub do you run first?
    If posting code please use code tags, see here.

  9. #9
    Forum Contributor
    Join Date
    10-26-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    133

    Re: How to arrange code differently

    This is the code I have, i have a button that i click to run it. I want it to run all of them starting at the top.
    but its not doing right.
    Thanks

    Please Login or Register  to view this content.

  10. #10
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: How to arrange code differently

    Which sub does the button call first?

  11. #11
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: How to arrange code differently

    You need to remove all the calling codes from each sub.

    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    10-26-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    133

    Re: How to arrange code differently

    Upper
    test1
    test2
    test3
    test4

  13. #13
    Forum Contributor
    Join Date
    10-26-2012
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    133

    Re: How to arrange code differently

    Thanks AB33. Thats Perfect.
    I really Appreciate 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. Problems with slow code, can this be coded differently to speed it up.
    By molesy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-15-2014, 07:01 AM
  2. BVA code act differently in 2 different woorkooks
    By Bruce Tjosvold in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-24-2012, 05:29 PM
  3. Modification of VBA code to arrange data.
    By fatalcore in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-14-2011, 02:14 PM
  4. VBA code behaves differently while stepping?
    By mhni in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-10-2009, 09:01 AM
  5. [SOLVED] Help with code to re-arrange data for pareto analysis
    By Steve S in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-23-2006, 03:10 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