Я пытаюсь создать строку, и внутри мне нужно использовать несколько двойных кавычек, я пытаюсь сделать это разными способами, но все выдают ошибку, пожалуйста, кто-нибудь может мне помочь?
Public Sub Script2()
Dim ScriptText As String
ScriptText = "[System.Windows.Forms.MessageBox]::Show(""""Message Text"""",""""Title"""",1)"
Call shell("PowerShell -noexit powershell.exe -Executionpolicy Bypass -Command " & ScriptText, vbNormalFocus)
End Sub
Если я попробую таким образом, я получу:
Message : The term 'Message' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
No line:1 character:88
+ ... ypass -Command[System.Windows.Forms.MessageBox]::Show(Message Text,Ti ...
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (Message:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException