Tagged Questions
0
votes
0answers
22 views
VBA. Picture, decoded from Base64 string, needs to be inserted into Excel sheet
I need to store encoded PNG image in a vbs script, then launch Excel, decode stored in VBS base64 image, and insert this image into Excel. In this article I found decoding solution. Finally, I got ...
0
votes
1answer
70 views
Using VBScript to change background color in Excel chart
I'm using VBScript to create a line scatter plot from columns of data in Excel 2003. It comes out fine, but I want to edit some of the properties of the chart, such as background color and axis ...
0
votes
0answers
25 views
JSON to Anything (Dictionary, XML, …) Converter
I need to work with a complex json within vbscript.
Now I'm searching for a converter to Dictionary, XML or anything else which is good to use in vbscript.
It is not possible to implement further ...
0
votes
1answer
27 views
QueryTable authentication
I have a VBScript which gets a data into Excel sheet through QueryTables. The script works fine, but the URL is a server which requires a basic authentication. So when the script runs the login pops ...
0
votes
1answer
31 views
run time error “subscript out of range”
I have written the following script and I'm getting runtime error subscript out of range. Can anyone help me with this?(The msgbox is used as a debugger)
Thanks in advance.
Sub newbook()
Dim bk ...
-5
votes
1answer
44 views
how to export multiple tables to excel using vbscript?
I need to import multiple tables from a HTML file that is generated using Perl script to Excel sheet using vba script.
I tried importing the tables with import external data option in Excel.
But I ...
-2
votes
0answers
31 views
VB Copy to Clipboard and use it in VB [closed]
I am preparing a project. In this project I need copy to clipboard function.I want use this thing which copied clipboard on Windows search. But I read in forums it is not possible to do this in VBS. ...
3
votes
1answer
34 views
Control VBScript using VBA
To achieve multithreading, I'm writing using VBA to construct VBScript code (VBStr) and write to file on-the-fly, before launching these helper scripts asynchonously:
Dim VBFile As Object
Dim VBPath ...
0
votes
1answer
39 views
VBA: Cannot implement Excel VBS outside of excel
I have the code shown below, which opens a workbook and runs the corresponding macro. Running this script through excel works just fine, but running the .vbs file with the same code does not run the ...
1
vote
3answers
72 views
What is the difference between .text, .value, and .value2?
I am not asking for help with any script, but my question is for clarification. Lately I have been doing a lot of VB scripting in Excel, so I am really referring to Excel in this question. What is the ...
-1
votes
1answer
67 views
rename a file in a folder with a specific string vbs
Can some one please help explain how I can write some vbs script that searches for files with a particular string and renames them?
For example, say I have a folder c:\test
I want to search in ...
0
votes
4answers
74 views
How can I tell whether the saved values are encrypted or decrypted?
I have managed to build something into a bound MS Access form that encrypts names as per client's request. This process also decrypts the data. I need a catch all that looks at what is in the input ...
2
votes
1answer
56 views
VB Script accented characters coming out as “Chinese” looking script?
I'm writing a VB script to replace words in a word doc.
The crux of the code is:
strEuropeanOld="European"
strEuropeanNew="Européen"
I then replace the word:
If InStr(FileText, strEuropeanOld) ...
1
vote
3answers
145 views
How can I use VBScript to effectively refresh the external data of several Excel spreadsheets?
I have a macro in one XLSM workbook's module that refreshes all the external data, then saves and closes that workbook.
ActiveWorkbook.RefreshAll
ActiveWorkbook.Save
ActiveWorkbook.Close
...
0
votes
1answer
60 views
Updating MS Power Point linked object such as chart or Excel sheet
I have a ppt which is generated every week. I have created a vbscript for updating the linked chart.. but i couldn't find how to identify the excel sheet which i have used for creating the table in ...
0
votes
1answer
56 views
How to pass vbscript variable into html
I am using vbscript and excels to automate one of my tasks.The below mentioned code automatically draft an email in outlook with an attachement.But still i have to manually enter the 'aa' values and ...
0
votes
1answer
78 views
Display timer as well as “Pause / Resume / Stop” Button
I have a small scrip that basically presses "F2" for me every 4 minutes for the duration of 8hours for the active application.
It works and is really basic as my skills in VB are extremely limited.
...
0
votes
0answers
90 views
Update XLSM (macros) via VBS, Current Directory
I am trying to run an excel macro via a scheduled task. I found a good working method here. My version of that vbs is here:
Option Explicit
On Error Resume Next
ExcelMacroExample
WScript.Echo ...
0
votes
1answer
119 views
Writing a vbscript to read data in a table and output total hours
I am working with a table like below, where there are projects that are broken down into tasks, and one task may appear more than once. I am aiming to get the sum of all hours of the same task, so for ...
0
votes
1answer
125 views
Extract All Excel Function Types From A String using Regex in VB
How can i extract excel functions (only their names) from a string in visual basic?
For example i have: Sin(B6)*Sum(A2:A4) So i want to find a way to have "Sin" and "Sum" from this.
Note: I already ...
0
votes
2answers
264 views
Adding to an array in VBA with strings as the index
Not sure I've labelled this correctly.
I have a bunch of cells containing strings of data. Each cell consists of something like this:
q1 = 1 | q2 = 3.2 | q3 = 5.6
q1 = 1.8 | q3 = 2.1 | q5 = 1.4
...
0
votes
0answers
76 views
Create Access ADE file from command line
I have inherited an Access 2007 application that needs to be saved as an ADE before release. Is there a way to do this from the commandline? I am trying to automate the build process as much as ...
0
votes
2answers
80 views
Visual Basic Fill Array with simple number set
I need to fill an array with numbers 1-50, and I currently have the code:
Dim numberSet(49)
For x = 1 To 50
numberSet(x - 1) = x
Next x
The challenge is to do it in the least amount of lines ...
-1
votes
1answer
48 views
vba to format/parse dataset in csv [duplicate]
Can anyone see whats wrong with this script?
Option Explicit
Dim lrow As Long
Dim lcol As Long
Dim i As Long
Dim j As Long
Dim strow As Long
Dim fso As Object
Dim xl As Excel.Application
Dim wb As ...
-1
votes
1answer
147 views
Connection to MS access 2007 via form using vba
I have created a sample MS access 2007 database and designed a form to retrieve the records of the user , if the username and password entered in the form matches the record.In the button action it ...
0
votes
1answer
62 views
Problems searching HTML with Regular Expressions
I'm trying to use regular expressions for the first time and having some trouble, maybe with my syntax.
Here's a sample string contained in my source file I'd like to find:
Type = Creature / Animal ...
3
votes
0answers
120 views
VBS Very very slow in ms word [closed]
So, I have a 100page long docx format document. I'm using a macro written in VBS to extract some information and then just generate a table from them.
I iterate through the paragraphs and store the ...
-1
votes
1answer
58 views
how to open and WRQ relection program through VB script?
I want to open test.r2w file (r2w is extention for WRQ reflection program) and then i want to run macro which is store inside of that file and then i want to close it automatically.
is it possible ...
0
votes
0answers
151 views
VBA Proxy settings for a non admin
At the moment i'm using the following code :
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & ...
1
vote
1answer
88 views
VBS: Terminate multiple running applications
I am trying to close multiple applications at the same time using the following VBS script, but am getting the error 0x80041017 on the For Each loop line. It works fine with just one application but I ...