Consulting

Results 1 to 5 of 5

Thread: Refreshing connection

  1. #1

    Question Refreshing connection

    Ok, I have a workbook that uses SQL to download data, sorts it with VBA, creates another workbooks etc. This workbook is running on my server 24/7. I have another workbook with settings(with stuff like, on monday create only two workbooks, on friday create three workbooks). Do I have to add an code for refreshing to main workbook, or does it refresh itself everytime i change the settings workbook?

  2. #2
    OK....
    So I'll explain it another way. I have two workbooks. Main workbook and Settings workbook.
    Main workbook is running 24/7 and runs **** load of macros. The Setting workbook has only one sheet with just one table, setting for the main workbook. Both workbooks are connected. The main workbook takes data from settings workbook. What I want to know, do I have to refresh the main workbook every time I change something in settings workbook or does it refresh it self before it executes the macros?
    Or is this code enough?
    ActiveWorkbook.RefreshAll
    ActiveWorkbook.RefreshAll

  3. #3
    VBAX Guru mancubus's Avatar
    Joined
    Dec 2010
    Location
    "Where I lay my head is home" :D
    Posts
    2,644
    if you mean Main Workbook has formulas linked to Setting Workbook and you need to recalculate the formulas, yes.
    PLS DO NOT PM; OPEN A THREAD INSTEAD!!!

    1) Posting Code
    [CODE]PasteYourCodeHere[/CODE]
    (or paste your code, select it, click # button)

    2) Uploading File(s)
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) (multiple files can be selected while holding Ctrl key) / Upload Files / Done
    Replace company specific / sensitive / confidential data. Include so many rows and sheets etc in the uploaded workbook to enable the helpers visualize the data and table structure. Helpers do not need the entire workbook.

    3) Testing the Codes
    always back up your files before testing the codes.

    4) Marking the Thread as Solved
    from Thread Tools (on the top right corner, above the first message)

  4. #4
    Yes! Thats what i ment. Is my code enough to recalculate formulas?

  5. #5
    VBAX Guru mancubus's Avatar
    Joined
    Dec 2010
    Location
    "Where I lay my head is home" :D
    Posts
    2,644
    PLS DO NOT PM; OPEN A THREAD INSTEAD!!!

    1) Posting Code
    [CODE]PasteYourCodeHere[/CODE]
    (or paste your code, select it, click # button)

    2) Uploading File(s)
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) (multiple files can be selected while holding Ctrl key) / Upload Files / Done
    Replace company specific / sensitive / confidential data. Include so many rows and sheets etc in the uploaded workbook to enable the helpers visualize the data and table structure. Helpers do not need the entire workbook.

    3) Testing the Codes
    always back up your files before testing the codes.

    4) Marking the Thread as Solved
    from Thread Tools (on the top right corner, above the first message)

Posting Permissions

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