Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default variable form control

I have two macros reading data from one of two userform listboxes.
These macros are actually the same but the used listbox. I'd like to
use just one code with variable listbox but I just don't know: how to
declare it?
Thanks for any experience.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default variable form control

Roman,

In brief...

In the form code

Sub lstSomething_Click
DoSomething lstSomething
End Sub

'In a general module
Sub DoSomething(lstName as MsForms.ListBox)
With lstName
msgbox .listcount
End With
End Sub

Robin Hammond
www.enhanceddatasystems.com

"Roman" wrote in message
ups.com...
I have two macros reading data from one of two userform listboxes.
These macros are actually the same but the used listbox. I'd like to
use just one code with variable listbox but I just don't know: how to
declare it?
Thanks for any experience.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default variable form control

Thank you much.

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
2007 Form Control/ActiveX Control font difference Nikko963 Excel Discussion (Misc queries) 0 April 15th 09 04:21 PM
Variable Reference to a Form Control Sharlene England Excel Programming 2 November 5th 04 10:56 PM
Tool Tip Text for Form control/ Active-X control Freddie[_2_] Excel Programming 0 October 19th 04 04:14 AM
Is it possible to open the VBA form with a link in a sheet and to pass variable from a cell to the VBA form? Daniel[_14_] Excel Programming 1 August 29th 04 01:20 PM
passing control value from one form to another form mark kubicki Excel Programming 1 April 3rd 04 01:27 AM


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

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"