+ Reply to Thread
Results 1 to 6 of 6

Loop writings from textboxes to arrays to ranges and then display the ranges in textboxes

  1. #1
    Registered User
    Join Date
    12-01-2016
    Location
    Denmark
    MS-Off Ver
    2016
    Posts
    17

    Loop writings from textboxes to arrays to ranges and then display the ranges in textboxes

    Third time is the charm You guys have been very helpful so far..

    This is for a project in Introduction to IT in Manufacturing.

    I have a Bar/Hotel with 9 rooms and each room can have 6 occupants. Each room has a range(vertical) named Room1, Room2 and so on

    The first part of my question is for the checkin:

    the strRoomCount is a global variabel containing the room number currently activated/clicked

    Please Login or Register  to view this content.
    And so it goes on for all 9 rooms... which seems a bit silly

    I have tried to rewrite that to:

    Please Login or Register  to view this content.

    The second part is closely related. Here I am writing the already populated range to the TextBoxes upon entering the room overview form in order to see who has been checked in.

    Like this:

    Please Login or Register  to view this content.
    And that continued for an eternity, cell by cell...

    My attempt at this is as follows:


    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Loop writings from textboxes to arrays to ranges and then display the ranges in textbo

    Sorry, are you saying that what youve written isnt working? What is the query?
    If someone has helped you then please add to their Reputation

  3. #3
    Registered User
    Join Date
    12-01-2016
    Location
    Denmark
    MS-Off Ver
    2016
    Posts
    17

    Re: Loop writings from textboxes to arrays to ranges and then display the ranges in textbo

    Yes exactly - and the error is before loading the userform. So I can't really see where the error is.

  4. #4
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Loop writings from textboxes to arrays to ranges and then display the ranges in textbo

    what exactly is the error though? and have you stepped through the code to see where it fails?

  5. #5
    Registered User
    Join Date
    12-01-2016
    Location
    Denmark
    MS-Off Ver
    2016
    Posts
    17

    Re: Loop writings from textboxes to arrays to ranges and then display the ranges in textbo

    Run-time error '13': Type Mismatch

    Can't really step through, as it returns that erroe immediately.

  6. #6
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Loop writings from textboxes to arrays to ranges and then display the ranges in textbo

    Without seeing the workbook its very difficult to even give a thought on where the error is. Type Mismatch is a fairly straight forward error to correct when you can see the code.

+ 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. Loop through textboxes on a worksheet
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-03-2015, 04:12 PM
  2. Replies: 0
    Last Post: 02-04-2015, 03:46 PM
  3. Combobox with named ranges values to Textboxes
    By Kburges in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-21-2013, 12:42 PM
  4. Loop textboxes(activex)
    By sohaila in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-10-2013, 05:18 AM
  5. [SOLVED] If then loop needed for Textboxes
    By minifreak in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-23-2012, 08:22 AM
  6. Loop into TextBoxes in an UserForm
    By pierre08 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-15-2010, 09:38 AM
  7. Textboxes, data arrays and vlookup functionality
    By kuraitori in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-21-2008, 01:50 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