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: 51
Default Use a variable for a Form reference

I am developing an application in Excel and need to allow for multiple screen
sizes. I have been referred to an article by Tom Ogilvy back in 2004 that
describes how to determine the screen resolution and from their differing
User Forms based on that screen resolution can be shown.

I have a number of routines that validate and initilise the data in the form
that will basically be duplicated unless I can find a way to use a parameter
for the Form name....

For example....instead of the code below explicity referring to the
VendorEntry_1280x1024 form I want to be able to use a variable that is passed
into the routine for all screen resolutions.....is that possible ?

The error that is returned when I try and use a variable is..."compile
error: invalid qualifer"


Public Sub RefreshVendorDataEntry_1280x1024()
'Routine only used to refresh the values in the list box

'Remove any selection within the List Box
VendorEntry_1280x1024.VendorDataListBox.ListIndex = -1
VendorEntry_1280x1024.VendorSalesStaffMember.ListI ndex = -1



Any help appreciated
 
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
How to reference variable worksheets and variable row glenn[_3_] Excel Programming 3 September 29th 07 02:44 PM
Pass variable from form to form to form headly Excel Programming 1 May 31st 06 02:50 AM
Problem with =sum(offset(cell reference,w,x,y,z). I want cell reference to be variable [email protected] Excel Worksheet Functions 2 December 11th 04 12:00 AM
Variable Reference to a Form Control Sharlene England Excel Programming 2 November 5th 04 10:56 PM
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


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