Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is Visual Basic the same as Visual Studio 2008? | Excel Worksheet Functions | |||
Visual Basic Programming for Excel | New Users to Excel | |||
Visual Basic programming | Excel Discussion (Misc queries) | |||
Linking to Visual Basic for Applications Help Files | Excel Discussion (Misc queries) | |||
changing the visual basic in office 2003 to visual studio net | Excel Discussion (Misc queries) |