+ Reply to Thread
Results 1 to 11 of 11

Run Time Error '94' Invalid use of null

  1. #1
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362

    Run Time Error '94' Invalid use of null

    hi again,

    I am receiving the error message Run Time Error '94' Invalid use of null when running my program.

    here is the code where the error is being caused:
    Please Login or Register  to view this content.
    thanks,

    stoey

  2. #2
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717
    The error generally mean that you are trying to use an object / item which is not defined..


    Might be you text box name is spelt differently and you are trying to call it by different spelling


    If you can post the workbook , we can try to find the error

  3. #3
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362
    here's the sample workbook requested
    Attached Files Attached Files

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    You are tring to load data from 90 cells into one label, most of which are empty so there is nothing to display.

    Why are you doing this?
    Hope that helps.

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

    Free DataBaseForm example

  5. #5
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717
    error is in this part of code



    Please Login or Register  to view this content.
    in the first line you have defined a range G10:G100... which will have 90 different values..

    And in the below code u are calling that 90 values in one text box .. which is not possible...


    try modifying the above code to
    "G10:G10" " , "h10:h10" and "i10:i10"

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362
    hi,

    to answer roy's question:
    You are tring to load data from 90 cells into one label, most of which are empty so there is nothing to display.

    Why are you doing this?
    i would like to display the training,time and date using label on a userform. So if a user enters the training, time and date title on any of the cells on that column, the values will still appear on the userform. any suggestions you have to improve this?

    question to Shijesh,
    will the values entered in any of those cells under the training,time and date be displayed still on the userform?

  7. #7
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717
    Quote Originally Posted by stoey View Post
    question to Shijesh,
    will the values entered in any of those cells under the training,time and date be displayed still on the userform?

    Hi stoey,

    Values will still be displayed.

  8. #8
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362
    hi Shijesh,

    i just tried changing:

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.
    but it doesn't work

  9. #9
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717
    Hi

    Test the attachement.
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362
    hi Shijesh,

    I tried the attachment you sent, i place some values on row 16 of column training title,time and date. when i run the userform, the label is empty for the training title, time and date.

  11. #11
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482
    You need to explain how the program should know which date to display from column G.
    Is it the first item in the list, excluding empty rows or maybe the last item in the list.

    You could event loop though all the records and buiild a string containing all dates and show that but that would not appear to make sense.

    Take some time to explain what you are trying to do rather than make us guess.
    Cheers
    Andy
    www.andypope.info

+ 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