LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 61
Default Passing the value of listbox to other Subs

Two options you might want to consider

1. Export/Import
The easist way I dealt with this sort of stuff is to save the choice to a
spreadsheet once its selected.
I generally have a worksheet that contains all the choices and the option a
user selects.
This way I always have a hard copy of the choices a user selects for later
reference.

Then simply import the data back in to use.

2. Make a function to pass variables

Alternatively you could just make the other sub a function and run it that
way

Sub Dummy
Dim Option as String
Dim result as string
Dim i as intiger

Option = listbox1.value
i = 10
result = Values(Option, i)

End Sub

Function Values(Option As String, i As Integer)
....
Values = ...
End Function

Hope this helps



 
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
General Question regarding passing cells, ranges, cell values through subs & functions [email protected] Excel Programming 1 September 5th 04 06:46 PM
General Question regarding passing cells, ranges, cell values through subs & functions [email protected] Excel Programming 2 September 5th 04 06:03 AM
General Question regarding passing cells, ranges, cell values through subs & functions [email protected] Excel Programming 1 September 4th 04 10:40 PM
General Question regarding passing cells, ranges, cell values through subs & functions [email protected] Excel Programming 1 September 4th 04 09:09 PM
Passing values between 2 subs ? [email protected] Excel Programming 1 November 21st 03 05:56 PM


All times are GMT +1. The time now is 02:04 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"