Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, I am using an online tutoria (http://www.contextures.com/xlUserForm02.html) to create a user for with combo boxes. Unfortunately the tutorial's actual code lacks th needed commenting so some of the commands are lost on me. I believe have modified the code to fit my project, however, after i attempt t run the user form i get the error "method or data member not found" an the compiler points me to the "offset" function specifically. Since i a not quite sure what the function does, i am not sure how to troubleshoo it. Any help or suggestions would be greatly appreciated. Below is my code in its entirety. Private Sub UserForm_Initialize() Dim cPartType As Range Dim cLoc As Range Dim cPartClass As Range Dim cWhouse As Range Dim ws As Worksheet Set ws = Worksheets("LookUpLists") For Each cPartType In ws.Range("PartTypeList") With Me.cboPartType .AddItem cPartType.Value .List(.ListCount - 1, 1) = cPart.*Offset*(0, 1).Value End With Next cPartType For Each cLoc In ws.Range("LocationList") With Me.cboLocation .AddItem cLoc.Value .List(.ListCount - 1, 1) = cLoc.*Offset*(0, 1).Value End With Next cLoc For Each cPartClass In ws.Range("PartClassList") With Me.cboPartClass .AddItem cPartClass.Value .List(.ListCount - 1, 1) = PartClass.*Offset*(0, 1).Value End With Next cPartClass For Each cWhouse In ws.Range("WarehouseList") With Me.cboWhouse .AddItem cWhouse.Value .List(.ListCount - 1, 1) = cWhouse.*Offset*(0, 1).Value End With Next cWhouse For Each cLoc In ws.Range("LocationList") With Me.cboLocation .AddItem cLoc.Value .List(.ListCount - 1, 1) = cLoc.Offset(0, 1).Value End With Next cLoc 'Not quite sure what the below does, especially "set focus" 'Me.txtDate.Value = Format(Date, "Medium Date") 'Me.txtQty.Value = 1 'Me.cboPart.SetFocus End Su -- merritt ----------------------------------------------------------------------- merritts's Profile: http://www.excelforum.com/member.php...fo&userid=3580 View this thread: http://www.excelforum.com/showthread.php?threadid=56351 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
help with this error-Compile error: cant find project or library | Excel Discussion (Misc queries) | |||
VBAProject name compile error, not defined at compile time | Excel Programming | |||
Help: Compile error: type mismatch: array or user defined type expected | Excel Programming | |||
How do I get rid of "Compile error in hidden module" error message | Excel Discussion (Misc queries) |