+ Reply to Thread
Results 1 to 9 of 9

why this macro doesn't work in my boss computer!?

  1. #1
    Registered User
    Join Date
    11-03-2011
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    44

    why this macro doesn't work in my boss computer!?

    Hello guys,

    I have a complex macro that runs other macros. Anyway, it works in all computer around including mine but it doesn't work in my boss' computer! funny, eh!...... it is really weird because he can run other macros but not my macro!!!! what do you think guys that is happening?

    This is the error:

    'Run time error 1004'
    'Application-defined or object-defined error

    I have tried in 5 different computers within the same network (even in other floors) and it works... but not in my my boss'computer who is sitting next to me!......

    It just doesn't make sense where the macro stops when he hits DEBUG, it is just here:

    Please Login or Register  to view this content.

    I do not know why.... I do not want to alter my code because it works in my computer and others but not on that computer...

    basically when the error shows up is when the macro is filtering a data base and then copying/paste that data into another woorkbook.... no idea what is wrong....

    any idea????

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: why this macro doesn't work in my boss computer!?

    Strange behavior. Can't explain it myself, but I got the same error when I tried the code for the first time on a new worksheet. (I created the variables needed first, of course.)

    I then started recording a macro, copied the vba formula to a cell and modified it to what a cell formula would be (replaced two sets of double-quotes with one set, etc.) and confirmed it. (Then stopped recording the macro.) It put the formula in and gave a result. The code generated used R1C1 notation, which is fine, I suppose. Everything in the R1C1 notation was the same as the A1 notation in VBA except the cell references of course.

    The really strange part is that after I went through those steps, I can now put YOUR code into any workbook (using A1 notation) and it works just fine. Close Excel and open new workbook - it works. Has me looking at my PC strangely. Usually it obeys me, but I'm going to have to give it a stern finger-pointing on this one.

  3. #3
    Registered User
    Join Date
    11-03-2011
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    44

    Re: why this macro doesn't work in my boss computer!?

    I didn't understand, hehe...... are you suggesting me to do something? I didn't get it....

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: why this macro doesn't work in my boss computer!?

    Not really a suggestion, but by messing around with it, it's now working on my PC. I can't explain it. The code that didn't work the first time, now works every time.

    All I can suggest at this point is to record a macro of you entering the proper formula (single set of quotes, etc.) into a cell on your boss' PC. Then stop the recording. Run the newly created code so that it does the same steps over again. Try running your original code again.

    ::shrug::

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: why this macro doesn't work in my boss computer!?

    Hi,

    Just to add to the confusion, on my laptop it worked straight out of the box after creating the variables.
    Do you and your boss have the same 2007 version of Excel, or does your boss perhaps have 2003 or 2010?

    I had a similar problem only last week where the same workbook on a client's PC didn't exhibit the same behaviour as on mine. It was actually to do with filtering rather than formulae, but I eventually tracked it down to a different parameter setting in Excel Options. Specifically the Lotus Compatibility Transistion Navigation key where theirs was unticked and mine ticked.

    I'm not suggesting this particular parameter is the problem in your case but it would be worth examining these to see if there are any differences and whether changing them solves the problem.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  6. #6
    Registered User
    Join Date
    11-03-2011
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    44

    Re: why this macro doesn't work in my boss computer!?

    Hello Richard,

    Yes, we have the same 2007 excel version as every body else in this company. What tab do I check exactly in EXCEP OPTIONS? I was looking around and I didn't see anything anormal. I think the macro stops after filtering and then when wanting to copy the data filtered into another file that is open, it stops there in his computer (whereas in mine and 5 others work perfectly until the end).

    thanks

  7. #7
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: why this macro doesn't work in my boss computer!?

    simply use this to check the validity of values

    Please Login or Register  to view this content.



  8. #8
    Registered User
    Join Date
    11-03-2011
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    44

    Re: why this macro doesn't work in my boss computer!?

    Just to give an update... the IT guy came and restored his profile in 5mins and got excel reinstalled and now it works... no idea what the problem was but reinstalling COMPLETELY excel did the job,

    thanks!

  9. #9
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: why this macro doesn't work in my boss computer!?

    Just a thought
    Was it possible that your bosses' machine was set to use semi-colon (;) delimiters in formulae rather than commas (,)?

+ 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