User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 401,476 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,115 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Views: 257 | Replies: 3
Reply
Join Date: Jan 2008
Posts: 5
Reputation: octavia is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
octavia octavia is offline Offline
Newbie Poster

Why I can't see the result

  #1  
Mar 30th, 2008
Hi all,

Could anyone please check my sample code because I can't see the final result?

Private Sub Form1_Load()
Call AnyNumberArguments
Call AnyNumberArguments(1)
Call AnyNumberArguments(2, 3)
Call AnyNumberArguments(4, 5, 6)
Call AnyNumberArguments(7, 8, 9, 10, 11, 12)
End Sub


Private Sub AnyNumberArguments(ParamArray x() As Variant)
Dim y As Integer

Print "Procedure AnyNumberArguments received:"
For y = LBound(x) To UBound(x)
Print x(y) & Space$(4);
Next y

Print

End Sub

Best Regards,

Octavia
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2007
Location: India
Posts: 493
Reputation: choudhuryshouvi is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 45
choudhuryshouvi's Avatar
choudhuryshouvi choudhuryshouvi is online now Online
Posting Pro in Training

Re: Why I can't see the result

  #2  
Mar 31st, 2008
call the function from some other event expect form_load.

try it inside of a command button click event.

it will work.

regards
Shouvik
Shouvik_The_Expert_Coder
Have a problem? Don't worry just give me a call and I'll fix it for you.
Reply With Quote  
Join Date: Jan 2008
Posts: 5
Reputation: octavia is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
octavia octavia is offline Offline
Newbie Poster

Re: Why I can't see the result

  #3  
Mar 31st, 2008
Hi choudhuryshouv,

I had already tested that method before. I could see the result.
I also used 'Debug.Print' to do the testing. These two methods can see the result, but I really don't know why we can print out while starting 'Form_Load'.

Thanks,
Octavia
Reply With Quote  
Join Date: May 2007
Location: India
Posts: 493
Reputation: choudhuryshouvi is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 45
choudhuryshouvi's Avatar
choudhuryshouvi choudhuryshouvi is online now Online
Posting Pro in Training

Re: Why I can't see the result

  #4  
Mar 31st, 2008
make the last print command inside ur function body commented.

and one more thing, i have already tried your code in my system, it worked smoothly and displayed the following result :-

Procedure AnyNumberArguements received:
Procedure AnyNumberArguements received:
1 Procedure AnyNumberArguements received:
2 3 Procedure AnyNumberArguements received:
4 5 6 Procedure AnyNumberArguements received:
7 8 9 10 11 12

regards
Shouvik
Shouvik_The_Expert_Coder
Have a problem? Don't worry just give me a call and I'll fix it for you.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 1:58 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC