Tagged Questions
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
votes
0answers
35 views
How to copy paste 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 ...
-4
votes
0answers
42 views
how to make your sql database to push every new data on excel [closed]
i am trying to retrieve data from sql database which is getting updated in every microsecond from a excel sheet which works fine
now the problem is that i want to retrieve this data on another excel ...
-1
votes
0answers
53 views
Excel - Pulling data & merging it from multiple csv files VB
I have 3 files:
- Poller.xlxs
- WL-2013-11-02-Weather.csv
- WL-2013-11-02-Alarms.csv
WL-2013-11-02-Weather.csv is an unopened, unconverted CSV file that is structured as such:
Time ...
0
votes
1answer
48 views
VBScript run Excel macros on multiple spreadsheets
I have a VB Script which runs correctly, however, inside the loop of spreadsheets, it seems to wait for the macro of the current spreadsheet to run before opening up the next spreadsheet and kicking ...
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 = ...
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
175 views
Excel - move a whole row into the next worksheet if cell contains specific text
I am trying to set up a formula where worksheet 1 is a list of install jobs for the month, there are several columns showing customers details and at the last column showing the progress of the job ...
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
3answers
41 views
A vbs script to remove annotation
I have a basic vbs code to split a file name at the first underscore. Eg:t_e_s_t becomes t.
I dont want to split the file name, I want to remove the annotation of the file name
that would consist out ...
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. ...
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
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
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
0answers
98 views
Multiple scheduled tasks(windows) + change the password + VBA
Apologies in advance if this is long winded and the question is a bit silly, but I am just seeking some general advice.
I have a general query regarding a very basic/off the cuff/rough system I have
...
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
1answer
38 views
Programmatically added macro to excel doesn´t appear after workbook is saved
i wanted to add an existing macro (auto_open.bas) to many excel sheets. Therefore i wrote an vbscript to add this macro. In debugging mode i can see that the macro is being appended to the ...
-2
votes
1answer
185 views
unterminated string constant QTP VB Script
I have a VB Script to connect SQL and retrieve value using ADODB recordset. Question: Upon using a multi- line SQL query with JOINs, i received error message : unterminated string constant.Kindly ...
0
votes
1answer
247 views
Need to Print SQL Record Set values in to Excel
Upon printing the (SQL)record set values, only the fields from first row gets printed. i need help to print all the fields from a record set using QTP VB script.
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
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 ...
1
vote
3answers
203 views
VBS: Type conflict when using a variable with application.run
I'd like to use a vbs-file as a bridge to get access from Java to a vba-macro which is inside an Excel file. Additionally, I need to transmit some variable parameters.
In Java I call open the ...
-2
votes
1answer
2k views
search for string in text file in vb and print lines
Hi I am new to VB and just though if someone could help me in my current scenario
I have a text file named shar.txt
It has 6 lines in it.
I am a new student
I am learning VB
Please ...
0
votes
2answers
315 views
Excel VBS Save output to directory the script was launched from
Updated code: The script executes but doesn't output anything and Excel.exe process continues to run. I need this to output to the directory the .vbs script was launched from and name the Excel file ...
0
votes
1answer
679 views
Automate download of a dynamically generated file after NTLM Authentication using vbscript/java
I am trying to automate to download a dynamically generated file on a server, so here are the steps what I have to carry out manually -
Login to the site using my credentials - It uses NTLM to ...
0
votes
1answer
221 views
Grouping Similar Cells in Excel [closed]
I have an excel sheet that has 7000+ records. It has two columns- Number and Title. The rows under the 'title' column contains strings and some of the strings are quite similar. For instance:
Need ...
2
votes
2answers
1k views
How to set a delay in VB Script to let Excel update data
I have an Excel file that automatically loads the data from an external database (via a Data Connection to an Accesss database that is, in turn, linked to a Sharepoint table). I need to automate the ...
1
vote
1answer
430 views
How to split a column in Excel into multiple columns, using categories from another column?
I have a very large data set with hundreds of thousands of rows. I have managed to split it into two columns like so:
Name: | John
Birth year: | 1982
Favorite sport: | Rugby
Favorite ...
1
vote
1answer
127 views
getelementsbyID inner dt id values
I am extracting data from HTML using Vb Script. This is the HTML code from which am trying to extract the data.
<dl id="overview">
<dt id="overview-summary-current-title" ...
0
votes
1answer
281 views
Excel getElementById extract the span class information
I need to extract certain information from HTML using VBA.
This is the HTML from which I am trying to extract the location information alone.
<dl id="headline" class="demographic-info adr">
...
0
votes
0answers
200 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
183 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
157 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
1answer
398 views
How to select the characters part of string in Visual basic
I have some string variables with combinations of numbers and characters. like this:
A12452
BCD23
ESK56003
Using vbscript I want to get the characters and not the numbersfrom these strings. So I ...
0
votes
2answers
249 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
vote
1answer
591 views
Get Row number of excel using ADO
We are trying to get the row number of particular recordset retreived based on soome condtion. consider below table
Name Id
abc 1
cde 2
efg 3
Now, how to get the row number or ...
7
votes
3answers
363 views
Updating values from external workbook automaticly
I have the following workbook setup:
Workbook A has a link to x amount of workbook B's and fetches data from them. The workbooks B have links to some other workbooks and fetches data from them.
...
-1
votes
1answer
80 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
210 views
VBA Proxy settings for a non admin
At the moment i'm using the following code :
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & ...
4
votes
2answers
1k views
Using excels named range in a sql string in VBScript
I have searched on here and google but I still cannot solve my issue. I am trying to use an excel's named range equivalently in my .vbs file. The below works in VBA in excel but I cannot get it to ...
3
votes
3answers
268 views
A Windows script to merge three csv file columns into one single column
I can do this within excel for example using the =CONCATENATE function to merge a number of columns into one single column. But i want to do is merge columns within 3 different csv files within the ...
0
votes
1answer
627 views
VB Script to convert excel to text exits with error code 9009
I have a VB Script in which i convert Excel ( .xls ) file to text file.
It exits with error code 9009.
I am running this script on a server on which Excel 2003 is installed, but not entire MS Office.
...
0
votes
1answer
652 views
How can I read Excel file row by row and send email to the names on the worksheet?
We have an Excel file called empList.xlsx with a list of users whose servers are very close to running out of space.
The email is intended to advise users of the current space status and to delete ...