LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Transfer Variable from Form to Module

I am having problems transferring a variable from a form back to a module.
My module is:

Public invP, vP
Sub Mod()
..
..
UserForm6.Show
MsgBox invP & vP
..
end sub

Private Sub CommandButton1_Click()
..
invP = ListBox1.ListIndex + 1
vP = ListBox2.ListIndex + 1
..
end sub

In the routine CommandButton1 invP=1 and vP=3
when the control returns to the routine Mod they both equal zero.
Any ideas why and how to make them behave?
 
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
Transfer variable to user Form jlclyde Excel Discussion (Misc queries) 2 April 23rd 10 08:25 PM
Access variable from form and module? parkin_m Excel Programming 1 August 8th 07 03:32 PM
Unload A Form based on a Variable in my Module [email protected] Excel Programming 4 May 2nd 07 11:11 PM
Transfer control to new module in macro BrianG[_4_] Excel Programming 2 October 20th 03 09:50 PM
Variable from a sheet module in a class module in XL XP hglamy[_2_] Excel Programming 2 October 14th 03 05:48 PM


All times are GMT +1. The time now is 10:17 AM.

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"