Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Visual Basic Programming Difficulties with linking Userforms

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 =)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Visual Basic Programming Difficulties with linking Userforms

Private Sub CommandButton1_click()
me.hide
Userform2.show
End Sub

There isn't any type of link that would remove redundant entries. You would
need to build a unique list and populate the box

See John Walkenbach's site for sample code:

http://j-walk.com/ss/excel/tips/tip47.htm

--
Regards,
Tom Ogilvy


Chuckie wrote in message
om...
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 =)



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Visual Basic Programming Difficulties with linking Userforms

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)
__________________________________________________ __________________________
________________

"Tom Ogilvy" wrote in message
...
Private Sub CommandButton1_click()
me.hide
Userform2.show
End Sub

There isn't any type of link that would remove redundant entries. You

would
need to build a unique list and populate the box

See John Walkenbach's site for sample code:

http://j-walk.com/ss/excel/tips/tip47.htm

--
Regards,
Tom Ogilvy


Chuckie wrote in message
om...
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 =)





Reply
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
Is Visual Basic the same as Visual Studio 2008? Mike Stewart Excel Worksheet Functions 5 January 11th 09 04:58 PM
Visual Basic Programming for Excel Venkatesh New Users to Excel 4 August 6th 07 11:48 AM
Visual Basic programming Jannick Excel Discussion (Misc queries) 2 February 27th 06 02:23 PM
Linking to Visual Basic for Applications Help Files Glynn Excel Discussion (Misc queries) 0 October 8th 05 01:29 AM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM


All times are GMT +1. The time now is 09:35 AM.

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

About Us

"It's about Microsoft Excel"