If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Building object's name at run time

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-27-03, 05:15
Khalid Khalid is offline
Registered User
 
Join Date: Jan 2002
Location: Libya
Posts: 50
Building object's name at run time

Hi,
In Microsoft Visual Basic, how can I call an object by building its name at run time?
for example, I wan to show a form (FORM1) by building its name at runtime as:

The following will work
===============
Dim f as Form
Set f = Form1
f.Show
===============


The following will not work, where I try to build the object name dynamically.
===============
Dim i as integer
i = 1
Dim f as Form
set f = "Form" & i
f.Show
===============

Can any body help me!

Thanks in advance
__________________
Khalid Yousef
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On