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: 87
Default Modifing example code

Hi - Beginner at code here!

I have taken this sample code from
http://www.contextures.on.ca/xlUserForm01.html#SetUp (which was a great help)
and downloaded the sample for Enhanced User forms with Combo boxes but I am
stuck on how to modify the first part.

Private Sub UserForm_Initialize()
Dim cPart As Range "This is the part I cannot work out what to
change it to.
Dim cLoc As Range I cannot see anything in the sheet or the
form that
Dim ws As Worksheet refers to cPart"
Set ws = Worksheets("LookupLists") "This I understand along with the rest
that
would make sense when
I work out the first
part - I think"

For Each cPart In ws.Range("PartIDList")
With Me.cboPart
.AddItem cPart.Value
.List(.ListCount - 1, 1) = cPart.Offset(0, 1).Value
End With
Next cPart

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


If anyone could help that would be great.
 
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
NEED HELP MODIFING A CELL miguel_0319 Excel Discussion (Misc queries) 1 August 2nd 09 05:55 PM
modifing the find function Chris Excel Discussion (Misc queries) 1 March 18th 08 07:00 PM
Help with modifing code?? Mekinnik Excel Programming 4 October 23rd 07 03:39 PM
Modifing a userform txtbox code [email protected] Excel Programming 0 June 13th 07 03:41 PM
Modifing a recorded macro. Duane Reynolds Excel Programming 1 August 9th 06 05:27 AM


All times are GMT +1. The time now is 06:05 PM.

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"