+ Reply to Thread
Results 1 to 3 of 3

Error 400: Adding days of the year to a userform

  1. #1
    Registered User
    Join Date
    03-21-2016
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    2

    Error 400: Adding days of the year to a userform

    Hi so I'm trying to make a userform for a person to add data to a spreadsheet without them having to go in and actually touch the spreadsheet itself, but I've encountered a bit of an odd problem.

    If I run my code (userform) in sheet3, there isn't an issue. It works exactly as it should. However, I'd like for the people doing the entry to see the numbers entered in after they've finished. The problem comes when you try to run the userform in any other sheet (it gives error 400)

    Note that sheet3 is holding the days of the year in the first column (They would pick a day, and do the data entry for that day only)

    I did a bit of digging into this and I know its stemming from the combo box add in part of the code but I can't figure out why.

    I know I could just lock the users to the sheet that does work so that there are no problems but I'd like to avoid that

    The errorcatching part of the code tells me (if not on sheet3) "Application-defined or object-defined error"

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Error 400: Adding days of the year to a userform

    Qualify each Cells reference with the worksheet.

    Please Login or Register  to view this content.
    Or just this...
    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    03-21-2016
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    2

    Re: Error 400: Adding days of the year to a userform

    That did the trick.

    Thanks!

+ 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] calculate total number of days between two days based on 365 days year
    By aparunkumar in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-14-2016, 12:51 AM
  2. having trouble with building a dropdown box that references days in a year and days in qtr
    By nawabaskari87 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-22-2014, 01:10 AM
  3. [SOLVED] Count days for specific year falling within in multi-year date range
    By jslo2013 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-04-2012, 05:58 PM
  4. Convert a multiple year list of 365 days/year into an equivalent of 360 days/year
    By lobotomy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-24-2012, 05:39 PM
  5. Replies: 2
    Last Post: 12-28-2011, 04:52 AM
  6. Adding Year,month and days
    By mutsri in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-06-2008, 10:40 AM
  7. i have two days and i want the difference in days, months, year
    By maja in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-21-2006, 08:14 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