+ Reply to Thread
Results 1 to 13 of 13

Program Not Working On Other Laptops

  1. #1
    Registered User
    Join Date
    03-20-2017
    Location
    Sheffield England
    MS-Off Ver
    2010
    Posts
    5

    Program Not Working On Other Laptops

    Hi All, I'm a bit new to the whole world of coding behind Excel, but I have created a little program that will generate some reports at work. Its working great on my laptop, but when others run it, it goes through the motions with no error messages, but none of the figures update.

    The overall process of the system - Users paste in data to a tab, the next tabs grab that data with a few filters on it and paste it into another tab. That pasted data drives the reports.

    For some reason, when others run it on their computers, it isn't pasting the data, so while it appears the reports are "updated", they aren't.

    I've gone through several options, looking at references which are being used, and they are all working fine on all the machines that have been tested, none say missing or anything.

    The whole code is built in a set of modules, which are simply called in order - In my head the code is very basic, and I can't see where the issue falls.

    Below is a look at the first step of code I use - This is the bit that seems to not be working. Its aim is simply to grab data from one tab (build tracker) in this Excel document, and paste it into another tab (Base Data), and add a few formulas.

    Any help would be massive! Or ideas of other areas I could check



    Please Login or Register  to view this content.
    Last edited by Somni4uk; 03-20-2017 at 10:04 AM.

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Program Not Working On Other Laptops

    Some sample data to actually test the code would be helpful...

    Also:
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  3. #3
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Program Not Working On Other Laptops

    Hi,

    First, you should use code tags when posting code: [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code].

    Second, to your question, have you tried saving the workbook before you query it in that step?
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  4. #4
    Registered User
    Join Date
    03-20-2017
    Location
    Sheffield England
    MS-Off Ver
    2010
    Posts
    5

    Re: Program Not Working On Other Laptops

    Sorry guys, updated to grab the code inside the code format.

    Regarding the saving question - Would it make a difference to this code if a document was run from an email attachment rather than being saved to a hard drive before running? I'm just checking with the guys in other locations, and it sounds like their test run was done while the file was still an email attachment.

  5. #5
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Program Not Working On Other Laptops

    Not necessarily, as far as I know, but if they paste the data in and don't save, the workbook on disk doesn't have the new information, so you're really querying the old data.

  6. #6
    Registered User
    Join Date
    03-20-2017
    Location
    Sheffield England
    MS-Off Ver
    2010
    Posts
    5

    Re: Program Not Working On Other Laptops

    The reports that do lookup to the data are basically sumif statements, so yes, what seems to be happening is that the data isn't being copied from the first tab to the second, so none of the reports are being updated.

    I've got people testing to see if this works when they have saved the file to a location - If that still doesn't catch it, are there any glaringly obvious errors in that code which would cause it to struggle doing whats almost a simple copy/paste?

  7. #7
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Program Not Working On Other Laptops

    The code syntax and principles both look right to me.

  8. #8
    Registered User
    Join Date
    03-20-2017
    Location
    Sheffield England
    MS-Off Ver
    2010
    Posts
    5

    Re: Program Not Working On Other Laptops

    Quote Originally Posted by xlnitwit View Post
    The code syntax and principles both look right to me.
    Thanks - Then I'll have to presume its something odd in the background, some form of settings in place, security, macro settings, or similar

  9. #9
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Program Not Working On Other Laptops

    Does saving the file not correct the problem?

  10. #10
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Program Not Working On Other Laptops

    As an aside, you shouldn't really use ADO for querying your open workbook, there's a known, very long-standing bug that causes a memory leak.

  11. #11
    Registered User
    Join Date
    03-20-2017
    Location
    Sheffield England
    MS-Off Ver
    2010
    Posts
    5

    Re: Program Not Working On Other Laptops

    Hi All, as an update on this thread, I believe I've found the fix. On each machine where the system had failed to update, within the options, trust center and macro settings, an option to allow VMB object models was not ticked.
    Having gone through them individually and ticked this, then retested, the system now runs perfectly on each of these computers, so for me, this fixed the problem.

    I've attempted to add a snapshot picture to show it

    snapshot.jpg

  12. #12
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Program Not Working On Other Laptops

    None of the code you posted tries to access the VBProject, so I would have to assume the problem lay elsewhere and that you have something like an On Error Resume Next statement that was suppressing the relevant error message.

  13. #13
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Program Not Working On Other Laptops

    Then you were on a hiding to nothing with this thread... there's nothing in the code you posted that relies on access to the VBA object model.

    it goes through the motions with no error message...
    Normally a consequence of using
    Please Login or Register  to view this content.
    But, again, not in the code you posted.

+ 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. VBA run time error 32809 in some laptops
    By ElTopoMarinero in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-09-2015, 07:05 PM
  2. Macros not working on only 2 laptops!
    By ykobure in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-06-2015, 12:13 PM
  3. Excel VBA Program stopped working
    By cebbie in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-20-2012, 07:12 AM
  4. Program for working out equations...
    By wibbler in forum Excel General
    Replies: 1
    Last Post: 01-05-2007, 06:28 AM
  5. [SOLVED] Add Message While Program is Working
    By maperalia in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-21-2006, 11:16 PM
  6. Excel and Laptops
    By astrikor in forum Excel General
    Replies: 3
    Last Post: 02-12-2006, 07:29 PM
  7. working with excel and other program
    By fal in forum Excel General
    Replies: 1
    Last Post: 07-08-2005, 08:05 AM

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