Visual Basic Programming Difficulties with linking Userforms

  • Thread starter Thread starter Chuckie
  • Start date Start date
C

Chuckie

Alrighty, I have bought 3 VBA books, and none have been
able to answer my questions. So, any help from anyone would be most
helpful. I also must apologize in advance since I cannot copy my code
into this window; I am currently not using my computer that has the
file stored on it.

1) In VBA, I have created two userforms: userform1 and
userform2. On Userform1 I created a couple of
commandbuttons. However, my codes are incorrect for
linking those commandbuttons to Userform2. Basically,
when I click on the commandbuttons I want it to show
Userform2. Does anyone know how to do this?
2) In addition, in VBA, I have created some listboxes on
my userform3. However, I wanted to link that list box to
a range of cells in my worksheet, and in addition, filter
out redundant numbers. Does anyone know how I may
approach this and possible code solutions?

Thank you for your time =)
 
If you use a "scratch" sheet which some people use, like a hidden sheet for
storing information, etc, you could also use AdvancedFilter ala something
like:

Range("Y3:Y11").AdvancedFilter Action:=xlFilterCopy,
CopyToRange:=Range( _
"AJ2"), Unique:=True

in order to get yourself a unique list of numbers, and then populate your
list box from your new range.

Mike.
____________________________________________________________________________
________________
Please reply to newsgroup so everyone can benefit.
Email address is not valid (see sparkingwire.com)
____________________________________________________________________________
________________
 
Back
Top