+ Reply to Thread
Results 1 to 9 of 9

Excel error message

Hybrid View

guismo30 Excel error message 10-27-2021, 09:34 AM
davesexcel Re: Excel error message 10-27-2021, 09:39 AM
guismo30 Re: Excel error message 10-28-2021, 01:50 AM
guismo30 Re: Excel error message 10-28-2021, 06:07 AM
davsth Re: Excel error message 10-28-2021, 06:55 AM
guismo30 Re: Excel error message 10-28-2021, 07:21 AM
scottiex Re: Excel error message 10-28-2021, 07:25 PM
guismo30 Re: Excel error message 10-29-2021, 05:27 AM
scottiex Re: Excel error message 10-31-2021, 02:15 PM
  1. #1
    Registered User
    Join Date
    04-19-2010
    Location
    belgium
    MS-Off Ver
    Office 365
    Posts
    53

    Excel error message

    Hello everyone,
    I have an issue with a file that i have created.in this file i have a macro that will copy/past value from the form, save it on the dekstop and send it to an email address. When I try it, it works prefectly, however, if a colleague of mine uses it, he has error message (see screenshot attached)
    could someone help finding out why this happens ?

    If i check my dekstop, it is on C:\Users\20032068\OneDrive - xxx Limited\Desktop but when they try, it seems that it gives the incorrect link to dekstop (c:\\Doccuments and Settings....)

        
    strThisFile = Range("FileNameInput").Value
        ActiveSheet.Protect Password:="123", DrawingObjects:=True, Contents:=True, Scenarios:=True _
            , AllowFormattingCells:=True, AllowInsertingColumns:=False, AllowInsertingRows:=False, AllowInsertingHyperlinks:=False
        strSaveToFolder = "\OneDrive - xxx Limited\Desktop\"
        strSaveTo = strSaveToFolder & strThisFile
        CheckFolder (strSaveToFolder)
        ActiveWorkbook.SaveAs Filename:=strSaveTo
    Thanks a lot for the support

    Guismo30
    Attached Images Attached Images
    Last edited by guismo30; 10-27-2021 at 09:39 AM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: Excel error message

    I am assuming ,
    strSaveToFolder = "\OneDrive - xxx Limited\Desktop\" needs to be the complete folder address

  3. #3
    Registered User
    Join Date
    04-19-2010
    Location
    belgium
    MS-Off Ver
    Office 365
    Posts
    53

    Re: Excel error message

    hello Daveexcel
    thank you for your answer, however, it is already in my coding

    , AllowFormattingCells:=True, AllowInsertingColumns:=False, AllowInsertingRows:=False, AllowInsertingHyperlinks:=False
    strSaveToFolder = "\OneDrive - xxx Limited\Desktop\"

  4. #4
    Registered User
    Join Date
    04-19-2010
    Location
    belgium
    MS-Off Ver
    Office 365
    Posts
    53

    Re: Excel error message

    any ideas ?

  5. #5
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Excel error message

    What folder do you want it to open?
    You are C:\Users\20032068\OneDrive - xxx Limited\Desktop
    what folder should it be for your colleague?

  6. #6
    Registered User
    Join Date
    04-19-2010
    Location
    belgium
    MS-Off Ver
    Office 365
    Posts
    53

    Re: Excel error message

    Hello Davsth
    thanks a lot for your answer
    two solutions, first is to save it simply on dekstop. this C:\Users\20032068\OneDrive - xxx Limited\Desktop seems to not work with my colleagues.
    second (buti am not in favour of this solution ) is to open a dialogue box and let the user save where they want...
    Regards

  7. #7
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,347

    Re: Excel error message

    is 20032068 your user name?
    I expect that needs to be whatever it is for each user

    for me it would be

    Environ("UserName")
    so

    "C:\Users\" & Environ("UserName") & "\OneDrive - xxx Limited\Desktop"
    edit : I see the one in the image is not the same...
    If you want something done right... find a forum and ask an online expert.

    Time flies like an arrow. Fruit flies like a banana.

  8. #8
    Registered User
    Join Date
    04-19-2010
    Location
    belgium
    MS-Off Ver
    Office 365
    Posts
    53

    Re: Excel error message

    Hi
    thanks a lot.. it works for me but not for my colleagues again... i become crasy with this !
    Last edited by davesexcel; 10-29-2021 at 06:51 AM.

  9. #9
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,347

    Re: Excel error message

    as per davsth post #5
    we need to know what it is for your colleagues.

+ 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. Query on Excel sheet returns error, how to prevent error message
    By rgsbouma in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-02-2019, 01:38 PM
  2. Error message in excel
    By Shradharani in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 03-08-2013, 10:19 AM
  3. Excel error message
    By charlee in forum Excel General
    Replies: 1
    Last Post: 10-19-2011, 01:38 AM
  4. Excel xmlHTTP object error message - system/runtime error
    By Porky2007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-23-2007, 09:36 AM
  5. [SOLVED] Excel error message ???
    By Blueboy969 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-23-2005, 03:05 PM
  6. Excel Error Message
    By Mark in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-06-2005, 03:05 AM
  7. Excel XP error message Run Time Error 91
    By Lenny in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-03-2005, 07:06 PM

Tags for this Thread

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