I'm trying to pass a string into the command line once I've opened it via shortcut. (I had to open it up this way due to permission issues and OneDrive being weird.)
I understand the code for the most part. The problem is how to pass a string into command prompt once it's opened since I'm not doing it the traditional way.
Is there a method to pass a string into this so command prompt can automate stuff I input?
Sub OpenFile()
Dim FileName As Variant
Dim FolderItem As Object
Dim FolderPath As Variant
Dim oFolder As Object
Dim oShell As Object
'Dim UserName As String
'UserName = InputBox("ex", "ex", "ex")
FolderPath = [B]"C:\Documents and Settings\users\Command Prmompt"[/B]
FileName = [B]"Command Prompt.lnk"[/B]
Set oShell = CreateObject("Shell.Application")
Set FolderItem = oShell.Namespace(FolderPath).ParseName(FileName)
FolderItem.Verbs.Item(0).DoIt
End Sub