Solved

substitution

Posted on 2000-02-29
2
155 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
Comment Utility
Try using:
t = Shell("telnet " & b , vbnormalfocus)
0
 
LVL 1

Expert Comment

by:jelliott720
Comment Utility

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Is an IP address in a Range 22 70
Use Multiple Forms 4 38
VBA open file from excel cell 4 33
Add and format columns in vb6 7 20
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
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…

772 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

11 Experts available now in Live!

Get 1:1 Help Now