+ Reply to Thread
Results 1 to 18 of 18

what does that Button do!?

  1. #1
    Registered User
    Join Date
    04-03-2009
    Location
    Brasília, Brazil
    MS-Off Ver
    Excel 2003
    Posts
    21

    what does that Button do!?

    I have a Spreadsheet for an old employer that doesn't work with me anymore.

    It has an button, that execute some jobs of automation of my office.

    the question is, how do I see the code of this Button?

    It name is Text box 2, and it is a Form. A tried alt+f11 and this is the unique code that I found:

    Please Login or Register  to view this content.
    Last edited by Uder; 04-13-2009 at 08:27 PM.

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983

    Re: what does that Button do!?

    Welcome to Exceltip forum

    Please take a couple of minutes and read ALL theForum Rules then wrap your VBA code (Rule 3)
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Registered User
    Join Date
    04-03-2009
    Location
    Brasília, Brazil
    MS-Off Ver
    Excel 2003
    Posts
    21

    Cool Re: what does that Button do!?

    Please, somebody... help me...

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: what does that Button do!?

    If you select RefreshAll in the code and press F1, this pops up:

    RefreshAll Method
    Refreshes all external data ranges and PivotTable reports in the specified workbook.

    expression.RefreshAll

    expression: Required. An expression that returns a Workbook object.

    Remarks
    Objects that have the BackgroundQuery property set to True are refreshed in the background.

    Example
    This example refreshes all external data ranges and PivotTable reports in the third workbook.
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    04-03-2009
    Location
    Brasília, Brazil
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: what does that Button do!?

    thank you shg!

    i can't found any BackgroundQuery....

    any suggestions?

    it is exactly what I need to know to solve my problem...

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: what does that Button do!?

    Quote Originally Posted by Uder View Post
    I have a Spreadsheet for an old employer that doesn't work with me anymore.
    Do you mean that you have "borrowed" a spreadsheet from a former job? If so maybe the spreadsheet can no longer access the data required for the query.

    Attach the workbook so we can see the full code.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  7. #7
    Registered User
    Join Date
    04-03-2009
    Location
    Brasília, Brazil
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: what does that Button do!?

    what I mean is: The guy who did the spreadsheet has left the place. The spreadsheet supose to work, but we need to change it. So, i can't find any code to change.. it is very strange to me. I know that it do some querys, but I can't find anything on file to understand it and improve it.

    I can't atach it... it has some confidential information...

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: what does that Button do!?

    remove the confidential information first, otherwise I think you have hit a brick wall!

  9. #9
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,466

    Re: what does that Button do!?

    Check the menu

    Data > Import External Data > Edit Query


    If you have Pivot tables or charts you can use the PT wizard to check where the data is coming from.
    Cheers
    Andy
    www.andypope.info

  10. #10
    Registered User
    Join Date
    04-03-2009
    Location
    Brasília, Brazil
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: what does that Button do!?

    Quote Originally Posted by royUK View Post
    remove the confidential information first, otherwise I think you have hit a brick wall!
    OK.. here is the file... I cleaned it. There is some macro, but it has no virus.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    04-03-2009
    Location
    Brasília, Brazil
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: what does that Button do!?

    Quote Originally Posted by Andy Pope View Post
    Check the menu

    Data > Import External Data > Edit Query


    If you have Pivot tables or charts you can use the PT wizard to check where the data is coming from.

    I'll check today, than I say if I find anything... Thank you a lot!

  12. #12
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,466

    Re: what does that Button do!?

    Try running this on your file. It will tell you information about what is being refreshed.

    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    04-03-2009
    Location
    Brasília, Brazil
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: what does that Button do!?

    Quote Originally Posted by Andy Pope View Post
    Try running this on your file. It will tell you information about what is being refreshed.

    Please Login or Register  to view this content.
    How do I do that?
    Sorry, I'm completely nob.

  14. #14
    Registered User
    Join Date
    04-03-2009
    Location
    Brasília, Brazil
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: what does that Button do!?

    Quote Originally Posted by Uder View Post
    How do I do that?
    Sorry, I'm completely nob.
    it doens't print anything when I running it on a new macro.
    Try o usu that on the file that I attached.

  15. #15
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,466

    Re: what does that Button do!?

    ALT+F11 to get to visual basic editor.
    Paste the code in to the code module.

    Run the macro and and information will be outputted to the immediate window.

    CTRL+G to activate Immediate window

  16. #16
    Registered User
    Join Date
    04-03-2009
    Location
    Brasília, Brazil
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: what does that Button do!?

    Quote Originally Posted by Andy Pope View Post
    ALT+F11 to get to visual basic editor.
    Paste the code in to the code module.

    Run the macro and and information will be outputted to the immediate window.

    CTRL+G to activate Immediate window

    Thank you a LOT!!! I found the query!!!

    But now, I have a question.
    How did that guy attached to that form (button) the original macro?
    Why it start all the querys?

    Please Login or Register  to view this content.

  17. #17
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,466

    Re: what does that Button do!?

    They added a shape to the sheet.
    Right click the shape and pick Assign Macro.

    Now the macro will run when the button is pressed.

    The RefreshAll command does what it says. It refreshes all the data queries in the workbook.

  18. #18
    Registered User
    Join Date
    04-03-2009
    Location
    Brasília, Brazil
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: what does that Button do!?

    Quote Originally Posted by Andy Pope View Post
    They added a shape to the sheet.
    Right click the shape and pick Assign Macro.

    Now the macro will run when the button is pressed.

    The RefreshAll command does what it says. It refreshes all the data queries in the workbook.
    God bless this Forum!!!!!!!!!

+ 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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1