Tagged Questions
-2
votes
1answer
45 views
batch remove all code after html end tag </html>
2 days ago my pc infected by VB Script Dropper Virus. Its infected my all of .html and .html file. So, after infected this virus write some code in all html/html file after the html end tag
Virus ...
0
votes
1answer
34 views
Excel Macro Explanation
What does this macro code does ?
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 1), Array(3, 1), Array(14, 1), Array(15, 1), Array(17, 1), ...
0
votes
1answer
19 views
Copying a specific word of webpage to excel using vbs
I want to copy the particular text "110001" present in a webpage to a sheet in my Excel file. Please tell me how I can do this through vbscript. Below is the relevant line of source code which I want ...
0
votes
0answers
36 views
Run excel macro using vbscript
I have an excel sheet "project.xlsm" with a macro that updates a cell value. I want to run the macro using vbscript externally. The important thing is I don't want the vbscript to open the workbook or ...
1
vote
1answer
55 views
How to create a textfile with the names of a directory of images?
Hallo my name is Dennis and I have the following directory IMAGES\:
EX0010040324303-001.tif
EX0010040324303-002.tif
EX0010040324303-003.tif
EX0020943843934-001.tif
EX0020943843934-002.tif
...
0
votes
1answer
39 views
In vbs/hta how do I tell if I reach the end of a word document?
I am currently creating a large script to automate a Microsoft word document to pull out tables and put them into a new document. But I need to know when I reach the end of the document so I can move ...
-1
votes
3answers
69 views
Sum of column values in named region
I have a workbook that has thousands of defined name regions located in various worksheets. I'm trying to extract them all and line them up in another workbook.
Most of the defined name regions are ...
0
votes
2answers
48 views
Pass Variable from Excel Macro to .vbs file
I have an excel button with a macro. The code simply stores the path of the workbook in a vaiable names 'MyCompletePath' and then runs a .vbs file. The code is:
MyCompletePath = ...
1
vote
1answer
48 views
Is there any way to speed up excel comparision in VBScript?
I first made a VBA script to compare two excel files. Then optimized it using Variant as said in this question. But then, I changed it to VBScript later. Here the method said above doesn't seem to ...
0
votes
2answers
49 views
Need a way to emulate PHP crypt() Function in vba
I have this function in PHP
public function hashPassword($password) {
return crypt($password, '$2a$07$twfAAA1954npfBBB1982oo');
}
It have stored passwords in a DB. and I am converting this DB ...
0
votes
0answers
18 views
vbs script that save attachment from one outlook sender
I want to add the attachment from a certain sender to a folder. Every week a get a cvs file attachmen from a sender and I add this manually to a folder so I can run my SSIS package. I want a vba ...
0
votes
0answers
40 views
Use WMI to retrieve IPv4 address from computer running IPv6
I'm using VBScript to retrieve the address of a remote computer using Win32_PingStatus, like so:
dnsServer = "myComputerName"
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
colIpQuery = ...
0
votes
0answers
60 views
Get Full Output From Plink Command
I'm using Plink on a Windows 7 box to connect to a remote linux/unix machine. I'm able to connect fine and send my needed command and can read the output, except for one hassle. The output returned ...
3
votes
2answers
78 views
Removing unwanted characters from in-front and behind cells in VBA (excel)
I’m very new to programming and although there are several similar questions to mine that have been asked, I can't seem to get them working for my needs.
What I want is to be able to copy raw data ...
0
votes
1answer
150 views
RegEx Find all occurrences and instances of multiple words if they exist in a string
This is a continuation of RegEx Only Return matches if words are present between two words
I'm trying to use RegEx with vbScript or VBA and find all occurrences of specific words in a string. This ...
0
votes
1answer
91 views
Parse and import unstructured text files into Microsoft Access (file has potential delimiters)
I have a bunch of text files that I need to import into MS Access (thousands) - can use 2007 or 2010. The text files have categories that are identified in square brackets and have relevant data ...
1
vote
3answers
107 views
RegEx Only Return matches if words are present between two words
I have a large Device Configuration File and I'm trying to use RegEx to parse out the relevant portions for further coding... The parts of the Config I'm trying to parse will start with the words ...
0
votes
1answer
186 views
vbscript to delete rows in an excel sheet using a specific condition
I have an excel sheet with a column containing data as follows and there is data in other columns.
Here there are blank cells between the rows. Between 1014,1027 there is 1 blank Cell. There are 3 ...
0
votes
0answers
66 views
Auto-save attachments to folder
I am testing a script that will auto-save attachments from outlook to a shared folder but upon debugging I'm experiencing this error "expected end of statement" , "800a0401" on line 1 char 20 for this ...
1
vote
3answers
80 views
Why Won't VBScript Paste? Word 2013
I am trying to create a VBScript that inserts some text from the clipboard into an existing (and loaded) Word document. I have tried numerous approaches without success (including Selection.Paste) ...
0
votes
0answers
36 views
How to get a handle on a running Access database from vbscript?
I have an Access database which is open. How can I reference it from a vbscript file? I want to do something like this:
MyAccessApp.CurrentDB.Execute ("...")
without having to createobject.
0
votes
0answers
87 views
Update opened file and not to reopen the same file
I have an excel sheet and I want to use VBScript to run a macro which updates a value on the sheet. I managed to find a script to do that, but the problem is this script always re-opens the file ...
0
votes
1answer
48 views
VBS file to refresh external data in specific work sheets
I want to create a .VBS file to refresh a table on a spcific worksheet. This table's data comes from an external data source (MS query). Usually, I just right click on the table and go to Refresh. ...
0
votes
0answers
64 views
Multithreading with the BackgroundWorker - ProgressChanged cant access the UI thread when background worker is called from a object
I am Using a background worker to run code in a seperate thread.
Here is the simplified version of the code.
Public Class frmMain
'Create the background worker
Public WithEvents BGW_MAIN As ...
1
vote
0answers
45 views
HTML + VBScript - Write to local Excel template
inside my html-file I use some vba-code by clicking a button. I connect to a Adodb to get some data, which is working fine. This data (stored in a recordset) should be saved in an excel-file by using ...
0
votes
0answers
24 views
how to get total page data into string in msword vba
I am able to fetch the current selected page number in msword using vbscript. I wanted to fetch the text from that pirticular page only and store it in string.
Can some one please help me on this.
...
1
vote
0answers
150 views
Embedding InfoPath form in email with VBA using SMTP/CDO
I am attempting to do the following:
Use VBA to generate SMTP email
Display InfoPath form embedded in email
This will be linked to an Access database
Unfortunately, I have not been able to ...
0
votes
1answer
62 views
Slide show generator in VBscript
I create this code for slideshow creator. When I copy into notepad and save as .vbs and try to run the script it has error. what is the problem? I am running Windows 7
Option Explicit On
Option ...
1
vote
1answer
52 views
Variable from VBA to VBScript
I am working on VBA, from which I have to call a vbscript by passing some values.
Here is the code:
''VBA
'Below values are on different cells of Excel file which I am reading
'into a global ...
0
votes
2answers
73 views
vbs syntax error: 800A03EE ')' expected
I try to execute this in a file called 'addcurrentkey.vbs'
But it says ')' is expected in row 1. Character 38.
I tried this tutorial: http://www.codeproject.com/Articles/16569/Autorun-Applications
...
0
votes
1answer
98 views
VBScript that exports filtered information from excel onto a webpage?
I'm extremely new to VBScript and have been trying to figure this out for the last couple of days, searching hundreds (literally) of forums/websites and can't find a solution to meet my needs so here ...
0
votes
1answer
351 views
Close excel file after reading with ODBC driver using VBScript
I have an excel file that is being read with using ODBC driver with the following code:
filePath = "folder\myExcelFile.xlsx"
odbcPath = "DRIVER={Microsoft Excel Driver (*.xls)}; IMEX=1; HDR=YES; ...
0
votes
1answer
30 views
Copy and paste data from different worksheets
I'm trying to use VB script to copy the data in excel sheet1 to sheet2.
The problem is that I would like to paste the copied data, starting in A1 and push the current data in A1 to the bottom of the ...
0
votes
1answer
173 views
Convert VBA Script to run as VBS file windows or some type of script on a linux box
I wrote the below code to check if a webserver/application was running and then log the result to a file. I did this using Excel VBA with FSO Scripting Runtime. I would like to convert this to a vbs ...
0
votes
3answers
176 views
How to loop through the weeks in a date range with vba
I have seen how to loop through weeks of a year, w1301,w1302,w1303, I can get the week number if i loop through + on week number but I believe there is a way to directly loop weekly with vba, i hope ...
0
votes
1answer
59 views
change cell properties from an excel file open with a wsf script
i have a wsf script, vritten in visual basic, that run a db2 query and save the results in a file .csv .
Function CreaCSVdaSQL (SQL,fileCompletePath)
Dim Input , conn,rs,csvtext,fso,fs,line
set ...
0
votes
2answers
179 views
Using data from an Excel spreadsheet in QuickTest Pro
I have been trying to figure out how to do this for a little while.. Here is my situation:
I have an Excel spreadsheet (lets call this "workbook.xls" and I have two sheets that I need to use for my ...
0
votes
2answers
213 views
passing argument from vba to vbs
I have one vb script and excel page with command button.
vb script---test.vbs
MsgBox("Hello world")
excel vba code
Private Sub CommandButton1_Click()
Dim SFilename As String
SFilename = ...
0
votes
1answer
112 views
VBA/VBS Pasting in field not working in Word 2013
I have an VBScript (although I can relate it to VBA) which has:
Set selection = application.Selection
With document.Fields.Add(selection.Range, 35, "Default" , True)
.Result.Paste
...
Note: ...
0
votes
1answer
53 views
VBscript + how to call function from current function [closed]
How to run function/procedure from function/procedure in VB scripts
Simple example that show the problem:
what need to fix here?
Function box
MsgBox("test")
function box1
...
0
votes
0answers
72 views
Is it possible to import classes from VBA to VBScript?
I have an MD5 hash algorithm in the form of a VBA class. I want to use that class in my program which is written in VBScript. Is it possible? Since the MD5 class is very lengthy, I am posting the link ...
-3
votes
1answer
158 views
VBScript to check files in folder and email the file name not updated past 1 hour
I need help, I'm new to VBScript.
I need a vbscript which can check a folder which contain 10 to 20 .csv files, need to check the date & time and send report of which files have not been updated ...
0
votes
0answers
131 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
1k 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
43 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
123 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
45 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
146 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 ...
3
votes
1answer
55 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
254 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 ...