+ Reply to Thread
Results 1 to 6 of 6

Issue with User Form Data Definition

  1. #1
    Registered User
    Join Date
    02-07-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2007
    Posts
    8

    Issue with User Form Data Definition

    I am running a userform to input data. Once entered calculations are made and the data is place into the file but I keep running into errors with the output strings. My code is:

    Please Login or Register  to view this content.
    But when the program gets to the data placement for EndDay I get an Error "Object doesn't support this property or method." or if I define EndDay.Value I get "Object Required".

    How do I fix this issue?

  2. #2
    Forum Contributor
    Join Date
    12-28-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    280

    Re: Issue with User Form Data Definition

    Which line does the code error on? What are your definitions of all you variables present (or have you defined them)?

  3. #3
    Registered User
    Join Date
    02-07-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Issue with User Form Data Definition

    It has the error with the statement

    Please Login or Register  to view this content.
    Spell, TimeEntry, DurationList are values entered into the userform. All other defined are listed. I have tried listing it as a Date variable, but that does not help the issue.

  4. #4
    Forum Contributor
    Join Date
    12-28-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    280

    Re: Issue with User Form Data Definition

    If you haven't dimensioned it as a range then it isn't going to have a Value property. In VBA, simple scalar variables (of which it would appear sEndDay is one) don't have any properties as they are not objects. Have you tried simply removing the .Value on the end of the code ie to:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-07-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Issue with User Form Data Definition

    Yes I have. That is what generates the Error "Object doesn't support this property or method."

  6. #6
    Registered User
    Join Date
    02-07-2012
    Location
    Michigan
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Issue with User Form Data Definition

    I went back and retype all of the lines and there must have been a typo because now everything works.

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Issue with User Form Data Definition

    Quote Originally Posted by tiggerzen View Post
    I went back and retype all of the lines and there must have been a typo because now everything works.
    Sounds like a good reason to use Option Explicit
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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