Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 19th, 2003, 03:07 PM
Registered User
 
Join Date: Aug 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default userforms in excel 2000

I am currently experiencing a difficulty in Excel 2000. I am using user
> forms to get information from a user. The variables are set in one user
> from
> and then another userform is shown. The values are lost when the second
> user
> form is opened. The variables are declared as Public in the general
> section
> of the first user form.


 
Old August 19th, 2003, 07:33 PM
Authorized User
 
Join Date: Aug 2003
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

p10rpc,

You can't declare global variables in a Userform.

Suggest that you have a startup module that sets the global variables then shows the Userform (i.e., Userform1.Show).

Must use the Public declaration rather than simply Dim for the variables to be recognized in both modules and Userforms.

CarlR

 
Old November 12th, 2003, 01:12 PM
Authorized User
 
Join Date: Aug 2003
Posts: 24
Thanks: 0
Thanked 1 Time in 1 Post
Default

declaring a public variable in module should be fine..






Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2000 upgrade to Excel 2007 poyserr Excel VBA 0 October 27th, 2008 10:51 AM
Problem in opening excel file in MS Excel 2000 kallol Visual C++ 0 November 16th, 2007 05:48 AM
Excel 2000 vs Excel 2002 Macro Issue williadn Excel VBA 1 July 14th, 2005 09:09 AM
Userforms DirtyGerty Excel VBA 0 October 7th, 2003 08:41 AM
Excel in win 2000 to excel winxp (excel 2002) Max Excel VBA 3 August 28th, 2003 04:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.