Skip to main content

All Questions

Tagged with
0 votes
1 answer
30 views

VBA String variable limitation for PowerShell output of File list in a folder

I am trying to export file properties of all files in a Root Folder and Subfolders. This is a huge file DB with around 300000 files. I have been using PowerShell for this purpose but the string ...
Ravi's user avatar
  • 55
0 votes
0 answers
24 views

How to print output file using CMD BATCH and vba

What arguments should I type after CMD BATCH args to produce an output file called my file.log? Dim shell As Object Set shell = VBA.CreateObject("WScript.Shell") Dim ...
Salvador's user avatar
  • 1,467
0 votes
0 answers
57 views

Powershell output blank on 1 computer but not on other

I wrote some code to return the ip address of the local computer. Basically I created a powershell script which has just 1 line of code in it: Invoke-RestMethod -Uri ('https://ipinfo.io/') Then in vba,...
JonWayn's user avatar
  • 39
0 votes
1 answer
307 views

VBA Wscript.Shell Run — how to run a script with high priority?

I'm want to run my python script from Excel VBA and this code works: Dim newShell As Object Dim PythonExePath As String, PythonScriptPath As String Set newShell = VBA.CreateObject("Wscript.Shell&...
Zhimolost's user avatar
0 votes
0 answers
104 views

vba WScript.Shell to run exe with JSON string as argument

I'm attempting to run an exe via command line that requires a JSON string as an argument. Inside that JSON string are dynamic start/end date variables, and a file name variable. I'm able to run the ...
Shaun's user avatar
  • 65
1 vote
3 answers
7k views

method run object iwshshell3 failed vba

I am trying to automate file upload on chrome with this VBA: Dim Customer_rates As String Dim WshShell As Object Customer_rates = "D:\FX Exch. Rates\2022-Feb-24 1707\...
Stoyan Bozhkov's user avatar
0 votes
0 answers
446 views

WScript.Shell with Windows 10 Enterprise

Due to Updates to Windows 10 Enterprise our MS Access VBA script isn't working anymore. Everything was fine using Windwows 8.1. Private Sub click_Click() Dim shell As Object Set shell = VBA....
basidio's user avatar
  • 15
0 votes
1 answer
632 views

vba wscript.shell copy file from folder to another folder based on cell path or filename

I want to do it with vba wscript.shell because copying files is faster and I want to copy files based on path or filename in excel cell based on the selection in column "E" and output the ...
roy's user avatar
  • 729
5 votes
1 answer
306 views

The word "encode" in a Wscript.Shell Exec does prevent powershell script from running. What can I do?

after a day close to insanity as of why my script wouldn't work on the data provided by the customer, I figured out, that it is the word "encode" somewhere enclosed in double and single ...
Daniel Kaupp's user avatar
0 votes
1 answer
1k views

VBA Automatically Dismiss a Message Box - Not closing?

I am trying the WScript.Shell script in VBA. The problem is that the window opens but does not close at the end of time. I think it has something to do with "enabling" VBScript. My code: Sub ...
Noémio Milhazes's user avatar
0 votes
1 answer
816 views

Using WScript with MS Edge to download multiple files leaves open Edge tabs

I am using a Wscript shell to automate the download of multiple (Excel files). The shell command creates a new tab (and popup window) in MS Edge for every download. What I would like is to create a ...
DS_London's user avatar
  • 4,181
0 votes
0 answers
240 views

Running Powershell(x86) from WScript.Shell

I have the following statement I'd like to execute in Powershell(x86) using VBA: %SystemRoot%\SysWOW64\WindowsPowerShell\v1.0\powershell.exe Set-ExecutionPolicy -Scope CurrentUser Unrestricted -force; ...
Felix_Dragonhammer's user avatar
2 votes
1 answer
1k views

WScript.Shell crashes Excel

I am using WshShell to run a batch file from VBA within Excel. The batch file is VERY simple, one line that runs a number crunching program. I can run the batch file directly without problems. I am ...
MJ_Nadeau's user avatar
1 vote
0 answers
55 views

Unequal multiple ping - VBA

I made a tool in Excel to catch pings from several IP but it has a problem when I set -n parameter on bigger value. First IP works good but next ones are delayed and I have to break them manual. ...
Sylwek's user avatar
  • 11
0 votes
0 answers
137 views

VBA code that executes two .bat files one after another

I'm trying to write a code that would create and execute two batch scripts, one after another. The 1st makes a given number of copies of my pdf file (makecopies.bat) and the 2nd one changes the names ...
A.P.'s user avatar
  • 1

15 30 50 per page