+ Reply to Thread
Results 1 to 8 of 8

The code have an error and do not run

  1. #1
    Registered User
    Join Date
    08-27-2015
    Location
    Friedberg
    MS-Off Ver
    2010
    Posts
    68

    The code have an error and do not run

    Hi all,

    with the following the VBA should open a "save as" window in Folder G:\Shareplan\test_31686\Plan\07\
    The user should choose a subfolder for example G:\Shareplan\test_31686\Plan\07\test123\ to save the file.
    The filename should be contrib_per_payroll_check_ & Tag --> for example "contrib_per_payroll_check_170405.

    Could you please check what is wrong in my code?

    Please Login or Register  to view this content.
    Kind regards,

    Thorsten
    Last edited by torti111; 04-05-2017 at 05:13 AM.

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,077

    Re: The code have an error and do not run

    You need to explain what's happening.
    "The code have an error"
    So what error message is being displayed (if any)?
    Or does it just not seem to do anything?
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    08-27-2015
    Location
    Friedberg
    MS-Off Ver
    2010
    Posts
    68

    Re: The code have an error and do not run

    Hi,
    I get the following error message "Can't assign to read-only property"

    Kind regards,
    Thorsten
    Last edited by torti111; 04-05-2017 at 05:15 AM.

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,077

    Re: The code have an error and do not run

    This is connected to Sun Systems Reporting Vision isn't it?
    I don't know anything about that.
    Maybe someone will reply who knows what this error means.

  5. #5
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,297

    Re: The code have an error and do not run

    Try this.

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  6. #6
    Registered User
    Join Date
    08-27-2015
    Location
    Friedberg
    MS-Off Ver
    2010
    Posts
    68

    Re: The code have an error and do not run

    Thank you for your help.
    But if I use your code, I am not in the correct path: G:\Shareplan\test_31686\Plan\07\ to choose the subfolder G:\Shareplan\test_31686\Plan\07\Q1.....
    If I clicked to the correct subfolder and click ok, it should save the file with Name "contrib_per_payroll_check_170405" automatically.
    Kind regards,
    Thorsten

  7. #7
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,297

    Re: The code have an error and do not run

    If the folder exists this line

    Please Login or Register  to view this content.
    will ALWAYS BE THE STARTING directory of the dialog box and present you all the subfolders of that directory

  8. #8
    Registered User
    Join Date
    08-27-2015
    Location
    Friedberg
    MS-Off Ver
    2010
    Posts
    68

    Re: The code have an error and do not run

    thanks a lot, again

+ 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. [SOLVED] Need error handler code to avoid pivot table refreshing error if no data is available
    By adelkam in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-04-2015, 12:37 PM
  2. Need to add if error code to worksheet change event to stop a run-time error
    By KT99 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-18-2014, 03:10 PM
  3. Replies: 4
    Last Post: 11-15-2013, 05:03 PM
  4. VBA Code...error = run time error 1004 autofilter method of range class failed
    By Dariusd7 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-15-2013, 04:49 PM
  5. [SOLVED] Getting Error 1004 Object or Application Defined Error - Code to rearrange data
    By BlazzedTroll in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 06-10-2013, 12:10 PM
  6. [SOLVED] Range error in code, runs alone but not inside my full program, giving runtime error 1004
    By charizzardd in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-23-2012, 03:34 PM
  7. Error 424 Object Required Error when Using AddItem to ListBox Generated in Code
    By jclark419 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-01-2010, 12:47 PM

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