Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-28-2017, 03:28 PM
clynch28 clynch28 is offline Run-Time Error 424 Mac OS X Run-Time Error 424 Office 2016
Novice
Run-Time Error 424
 
Join Date: Nov 2017
Posts: 3
clynch28 is on a distinguished road
Default Run-Time Error 424

I'm writing code to access a userform and I am getting a run-time 424 object required error and I cannot figure out what is wrong with it. I'm attaching the code initializing the userform as well as the sub where I am having the issue.

Option Base 1

Public Type apartment
name As String
bed As Integer
bath As Integer
size As Integer
pool As Boolean
cable As Boolean
pet As Boolean
fitness As Boolean
rent As Currency
End Type


Sub loadData()

Dim txtFile As String
Dim dataLine As String
Dim row As Integer, column As Integer
Dim arrayForOneLine() As String


txtFile = ThisWorkbook.Path & "/data.txt"
Open txtFile For Input As #1


Do Until EOF(1)
Line Input #1, dataLine
arrayForOneLine = Split(dataLine, vbTab)


row = row + 1
ReDim apartmentArray(row)

apartment.name = arrayForOneLine(0)
apartment.bed = arrayForOneLine(1)
apartment.bath = arrayForOneLine(2)
apartment.size = arrayForOneLine(3)
apartment.pool = arrayForOneLine(4)
apartment.cable = arrayForOneLine(5)
apartment.pet = arrayForOneLine(6)
apartment.fitness = arrayForOneLine(7)
apartment.rent = arrayForOneLine(8)


Loop
Close #1

End Sub

Private Sub UserForm_Initialize()

bedComboBox.Style = fmStyleDropDownList
bathComboBox.Style = fmStyleDropDownList
sizeComboBox.Style = fmStyleDropDownList

With bedComboBox
.AddItem "1"
.AddItem "2"
.AddItem "3"
.AddItem "4"
End With

With bathComboBox
.AddItem "1"
.AddItem "2"
.AddItem "3"
End With

With sizeComboBox
.AddItem "less than 500 sf"
.AddItem "501-1000 sf"
.AddItem "1001-1500 sf"
.AddItem "1501-2000 sf"
.AddItem "more than 2000 sf"
End With

With Page3
OptionButton1.Value = True
End With

Page1.Select

End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Run Time Error '1004' galkej Excel 0 02-03-2014 06:39 AM
Get Run-time Error 11 Jamtart PowerPoint 2 08-31-2012 05:04 AM
Run-Time Error 424 Run time error 1004 yonasan Excel Programming 3 06-12-2012 11:08 PM
Word Visual Basic error - run time error 504 crazymorton Word 11 01-13-2012 04:32 AM
Run-Time Error 424 Run-time error 438 cksm4 Word 2 01-12-2011 03:41 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:15 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft