LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Compile Error with User from


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with this error-Compile error: cant find project or library JackR Excel Discussion (Misc queries) 2 June 10th 06 09:09 PM
VBAProject name compile error, not defined at compile time Matthew Dodds Excel Programming 1 December 13th 05 07:17 PM
Help: Compile error: type mismatch: array or user defined type expected lvcha.gouqizi Excel Programming 1 October 31st 05 08:20 PM
How do I get rid of "Compile error in hidden module" error message David Excel Discussion (Misc queries) 4 January 21st 05 11:39 PM


All times are GMT +1. The time now is 10:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"