+ Reply to Thread
Results 1 to 17 of 17

macro from sheet1, executing macro from sheet 2 and 3

  1. #1
    Forum Contributor
    Join Date
    04-26-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    167

    macro from sheet1, executing macro from sheet 2 and 3

    Hi,

    basicly, on sheet 1 i have this macro. I want that it execute the macro on sheet number 2 and number 3...but it doesnt work..

    Please Login or Register  to view this content.
    Last edited by extremis; 05-01-2013 at 03:23 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: macro from sheet1, executing macro from sheet 2 and 3

    Delete the private prefix to the other subs
    Elegant Simplicity............. Not Always

  3. #3
    Forum Contributor
    Join Date
    04-26-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    167

    Re: macro from sheet1, executing macro from sheet 2 and 3

    Private prefix to the other subs..sorry I am learning right now, could you show me what do you imply?

  4. #4
    Forum Contributor
    Join Date
    04-26-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    167

    Re: macro from sheet1, executing macro from sheet 2 and 3

    you mean the sheet("sheet2") ??

    so it should like that?

    Please Login or Register  to view this content.
    Well...it doesnt work...and both FilterCHISETUPPPLAPOC and refresh macro work. I tested them
    Last edited by extremis; 05-01-2013 at 02:16 PM.

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: macro from sheet1, executing macro from sheet 2 and 3

    Maybe:

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    04-26-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    167

    Re: macro from sheet1, executing macro from sheet 2 and 3

    Nope......nice try tough ...

    the macro seem to stay on sheet 1...for some reason..-_-

  7. #7
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: macro from sheet1, executing macro from sheet 2 and 3

    On the other sheets the subs will usually by preceded by Private ... e.g. Private Sub Extremis()
    I think if you delete the private element you can call them from other sheets. e.g. Sub Extremis()

    If that doesn't work you'll have to move the other subs into a code module and the first line of code for each will need to activate the relevant sheet.
    Last edited by AndyLitch; 05-01-2013 at 02:31 PM.

  8. #8
    Forum Contributor
    Join Date
    04-26-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    167

    Re: macro from sheet1, executing macro from sheet 2 and 3

    Not on private mode..already

  9. #9
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: macro from sheet1, executing macro from sheet 2 and 3

    Quote Originally Posted by extremis View Post
    Nope......nice try tough ...

    the macro seem to stay on sheet 1...for some reason..-_-
    Is the code you mention on Sheet1 Event Code for Sheet1? If possible can you post the code you have?

  10. #10
    Forum Contributor
    Join Date
    04-26-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    167

    Re: macro from sheet1, executing macro from sheet 2 and 3

    alright...on sheet1

    Please Login or Register  to view this content.
    on sheet2

    Please Login or Register  to view this content.

    on sheet3

    Please Login or Register  to view this content.
    Last edited by extremis; 05-01-2013 at 02:37 PM.

  11. #11
    Forum Contributor
    Join Date
    04-26-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    167

    Re: macro from sheet1, executing macro from sheet 2 and 3

    So, what do you think? macro on sheet 2 and 3 work. I tested the macros...

  12. #12
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: macro from sheet1, executing macro from sheet 2 and 3

    sheet1 macro calls the other 2.............
    So you should only need to call the sheet 1 macro

  13. #13
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: macro from sheet1, executing macro from sheet 2 and 3

    Is your code in the Sheet Module or a Standard Module? I think you want your code in a Standard Module. Go to your VBA Editor and Insert a Module. Copy and paste the above code there. Then try to call it.

  14. #14
    Forum Contributor
    Join Date
    04-26-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    167

    Re: macro from sheet1, executing macro from sheet 2 and 3

    ok it work...

    explain me that PLEASE....how to put it on a module it just make it work?

  15. #15
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: macro from sheet1, executing macro from sheet 2 and 3

    Here is a great on-line course about macros from microsoft. It has a section explaining how to insert a standard module and place your macros there.

    http://office.microsoft.com/en-us/tr...22986&client=1

  16. #16
    Forum Contributor
    Join Date
    04-26-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    167

    Re: macro from sheet1, executing macro from sheet 2 and 3

    you know where i can find more of thoses course? I would like to teach myself VBA.

    pretty useful

  17. #17
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: macro from sheet1, executing macro from sheet 2 and 3

    Sure there is a wealth of information on the internet about free online courses. Just Google VBA. Also this website is very helpful.

+ 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

X vBulletin 4.1.8 Debug Information

  • Page Generation 0.08036 seconds
  • Memory Usage 9,273KB
  • Queries Executed 14 (?)
More Information
Template Usage (33):
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (6)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (17)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (4)navbar_noticebit
  • (6)option
  • (17)postbit_legacy
  • (17)postbit_onlinestatus
  • (17)postbit_wrapper
  • (4)showthread_bookmarksite
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper
  • (1)vbseo_linkbackmenu_entry 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (39):
  • ./vbseo.php
  • ./env.php
  • ./vbseo/includes/functions_vbseo.php
  • ./vbseo/includes/functions_vbseo_pre.php
  • ./vbseo/includes/functions_vbseo_url.php
  • ./vbseo/includes/functions_vbseo_createurl.php
  • ./vbseo/includes/functions_vbseo_db.php
  • ./vbseo/includes/functions_vbseo_vb.php
  • ./vbseo/includes/functions_vbseo_seo.php
  • ./vbseo/includes/functions_vbseo_misc.php
  • ./vbseo/includes/functions_vbseo_crr.php
  • ./vbseo/includes/functions_vbseo_cache.php
  • ./vbseo/includes/functions_vbseo_hook.php
  • ./vbseo/includes/functions_vbseo_startup.php
  • ./includes/config.php
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/functions.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/functions_cforum.php
  • ./includes/functions_facebook.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (46):
  • init_startup
  • friendlyurl_resolve_class
  • database_pre_fetch_array
  • database_post_fetch_array
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • fetch_musername
  • cache_templates
  • template_register_var
  • parse_templates
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • reputation_image
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • showthread_bookmarkbit
  • navbits
  • navbits_complete
  • showthread_complete


Search Engine Friendly URLs by vBSEO 3.6.0 RC 1