Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

substitution

Posted on 2000-02-29
2
Medium Priority
?
166 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 400 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

916 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