Solved

substitution

Posted on 2000-02-29
2
158 Views
Last Modified: 2010-05-02
I want to call shell function  and supply parameter

Public Function Te(b)
t = "Shell" & "(" & Chr(34) & "telnet " & b & Chr(34) & ", vbnormalfocus)"
Te = t
End Function

Now if I call
Private Sub Command2_Click()
 l = Te("matt")
 End Sub
Vb assigns string to l but fail to "call" shell
How to implement it?
0
Comment
Question by:mativare
2 Comments
 
LVL 3

Accepted Solution

by:
Lewy earned 100 total points
ID: 2570142
Try using:
t = Shell("telnet " & b , vbnormalfocus)
0
 
LVL 1

Expert Comment

by:jelliott720
ID: 2570181

Try it his way...

Public Function Te(b)
dim hProg as long
t = Chr(34) & "telnet " & b & Chr(34)
hProg = Shell(t, VbNormalFocus)
End Function



0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now