0
votes
0answers
21 views

Multiple-step OLE DB operation generated errors- excel vba

I have .vbs script file that calls a macro inside an excel file using below code: Set xlApp = CreateObject("Excel.Application") Set xlBook = xlApp.Workbooks.Open("C:\Users\Report.xlsm", 0, True) ...
2
votes
0answers
35 views

Can I access and query web-based Crystal Report Viewer through Excel VBA?

I download reports through web-based access to a Crystal Report Viewer. (Admittedly, my first problem is that I am not at all proficient with Crystal.) I generally have success using Excel VBA in ...
0
votes
0answers
17 views

Can we copy a table from excel to a webpage using VBscript? [on hold]

Can we copy the table from the excel to a webpage using VB script? Actually the webpage has the edit option so can I replace the table in it with the table from the excel sheet (which i have update)? ...
0
votes
0answers
14 views

VB script: How to click the link/button that has only class in VB script

Hi I am trying to click on the link to close the popup using the VB script, but it has no ID or name, It just has the class. I tired to get the element by classname "Document.getElementsByClassName", ...
0
votes
2answers
20 views

Search for string on cell starting with two specific letters and highlight entire row

I want to highlight the row that contains letters starting with "ZZ*" green Then highlight the row that contains letters starting with "ZV*" yellow and so on. I used conditional formatting formula ...
1
vote
0answers
46 views

vba, include functions like c++(or many other languages)

I have recently started working on lots of vba/excel work. Coming from python/sas/c++ environment I am having some issues getting comfortable with the methodology. Realizing I am using same macros ...
0
votes
3answers
47 views

does vbs scripting still work in windows 7/8

Apologies in advance for my terminology or possible lack of knowledge in this area. This is a *.vbs script that will open a excell workbook WBName = "\WorkBookName.xlsm" (generally in the same ...
0
votes
1answer
107 views

CreateOleObject opened workbook won't run macro containing Application.Run “Solver.xlam!…” causes error 400

This problem has a relationship to a previous post I saw (not my question), which was closed: Excecute Excel macros through Delphi But I believe I have debugged my issue to a more general OLE/VBA ...
0
votes
0answers
35 views

VBScript Excel FormulaR1C1

When I want to set new formula into excel cell from VBScript I do this: ObjE.WorkSheets(1).Cells(3,3).Select ObjE.ActiveCell.FormulaR1C1 = "=R1C1*2" Then I save workbook and its OK. But when I want ...
0
votes
1answer
25 views

VBS Reg error in Win7 32bit & 64bit

I have made the following script in VBS but although it does work in windows xp & vista, I cant get it to work in win7 both 32 & 64 bit. set myclip = createobject("clipbrd.clipboard") bcode ...
2
votes
1answer
46 views

read comma separated integers in INI file

I have a INI file that looks like this ! [columnNumber] Number1=2,4 this is my code the ini file is read using function defined here the columberNumber is taken as string "2,4" i want to split ...
0
votes
1answer
68 views

VBScript To Launch Internet Explorer With A URL Generated

Currently I'm a learning HTA programming. I have a requirement as follows. There are two input boxes in the form (both are mandatory). When I enter the values and click on search button, a url ...
0
votes
3answers
86 views

Multiple TextBox for Input in VBScript

Can we have multiple input text boxes in VBScript? I'm trying to create a form window using VBScript itself. I should get two values as input. Please help me.
0
votes
1answer
22 views

vbscript, recursively set object

I'm trying to make a script to upload my personal pictures to Flickr through sending mail. The full script can be found here: http://pastebin.com/6pQFMZmk I have chosen to use Excel as a database ...
-1
votes
1answer
42 views

How to count date on the x axis and plot in graph

I am new to VBA. I am trying to write a script that counts the dates in a row (until the row ends) and plot the dates on the x-axis with the corresponding frequency the dates appear on the y-axis. ...
2
votes
1answer
19 views

Runtime error 438 when copying from one workbook to the other

I'm running this code to copy data from one workbook into another main workbook but keep getting runtime error 438 at line 12. Whats going on? Thanks in advance! 1 Sub copydata() 2 Dim wbk ...
3
votes
2answers
64 views

Splitting IF statement in multiple lines in VBScript

I was wondering if in VBScript I can break a IF statement in multiple lines. Like - If (UCase(Trim(objSheet.Cells(i, a).Value)) = "YES") Or _ (UCase(Trim(objSheet.Cells(i, b).Value)) = "NO") Then ' ...
0
votes
1answer
140 views

Visual Basic runtime error 1004

I am trying to write a Visual Basic Script to run by windows task scheduler. The script is supposed to open a delimited text file into excel and then save it as an .xlsx file. Function ImportText() ...
0
votes
0answers
64 views

Object Required 'All.Item(…)' Error in VBScript

I have created some VBScript to log me into a website, using username and password input from the user. The login works fine, but when it redirects you to the next website, I get this error: Object ...
0
votes
1answer
183 views

How to set password to Active Directory account using vbscript and excel worksheet

I've created a script that will export data from an excel worksheet and create an AD user. Everything works perfectly if I set the password inside the script; but I do not want to place the password ...
0
votes
1answer
48 views

How can I code to close an open workbook using its directory path instead of its name using vba in excel?

So I've written a script that opens a certain workbook using its directory pathway (through text from a userform textbox) and I want to be able to close it at the end of the script. My script ...
0
votes
1answer
119 views

Modify VBS – Excel Macro Loop Apply to all files in folder

I have a script that applies a macro to multiple excel spreadsheets. The code below opens specific file names and runs the script. I would love to modify this to run on all xls files within a ...
0
votes
0answers
61 views

Using Workbooks.Open when file has 'unreadable content' / VBS

Below a VBS code converts .xls into .csv. Set oBook = oExcel.Workbooks.Open(sfile) oBook.SaveAs fulldest, 6 oBook.Close False If works fine for most files but one of them has the usual ...
0
votes
1answer
55 views

Excel Intersect Method in VBS

I am trying to find if a cell exists within a range.. I copied method found in VBA code and tried to convert it to vbs.. But it throws ""Unable to get the Intersect property of the Application class ...
2
votes
2answers
134 views

Running code from VBA to VBScript back to VBA

I'm trying to figure out a way to call a VBScript function using vba in Excel, and then pass a value back to excel-vba. See below VBA within Excel Sub RunTest() Dim objString as String ...
0
votes
0answers
187 views

Refresh Excel 2013 Data Model from vbscript fails because of negative number format issue

I'm in the process of automating some reporting tasks using MS Excel 2013 (with PowerPivot). After several days of research and programming, I'm stuck with the following problem: I do have an MS ...
0
votes
1answer
69 views

VB: Highlight Excel cell in worksheet

I was wondering if it was possible to create a vbs file to highlight a cell in an excel workbook. I have an excel worksheet with multiple computer host-names, I also run a script in batch that pings ...
0
votes
1answer
328 views

Call a Unix Script from Excel Vba

Im trying to call a set of Unix commands from VBA using Plink ( putty Command Line) but the commands are not getting Executed . I ll post the code any corrections or suggestions would be helpful. ...
0
votes
1answer
54 views

Get Unique data from excel by button click?

I am new to excel macros. need some help from you.I have a excel file with 2 sheets. in sheet one i have some data In second sheet i need a button which will fetch the distinct C column(Mname) and ...
1
vote
1answer
152 views

“File In Use” message stopping overnight run of Visual Basic Excel Script

So I have a VBScript that I run through my task scheduler. Been testing it and running it everyday and about 50% of the time I see this error in the morning when I come into work: And then if I hit ...
0
votes
1answer
107 views

VBscript No output attempting query AD users last 30 days

I had a working query but it was grabbing all users in AD and I am attempting to narrow this down to the last 90 days. The problem is that I no longer have any outputs even though the query does run. ...
0
votes
1answer
18 views

VB excel change color of output “Disabled”

How do I change the Font Color if the cell is filled with disabled? Currently I have, If Uservar And 2 Then rngOut.Value = "Disabled" Else rngOut.Value = "Enabled" End If I want "Disabled" ...
0
votes
1answer
111 views

Reading the activate link URL from the Lotus notes mail

My requirement is to click an link in the lotus notes mail after creating a user name in website. I got the code from earlier forum to get the body of the mail. What I thought if there is a text like ...
0
votes
1answer
38 views

Blank Variable in Array VBS

I am new to VBS and I am trying to create an array from some variables gathered from a text file, however as a test when I try to echo out the array the first variable is blank and I have no idea why, ...
-1
votes
1answer
565 views

Tab delimited text file to Excel file with text formatted

I am new to VB Programming .I want to convert a text file into a excel file.The text file is comma seperated and Unicode file.And the converted excel file should have all fields in text format(To ...
0
votes
2answers
268 views

Executing VBS Code in VBA with admin rights

how are you doing? I want to execute VBS code in a VBA environment, in this case I am working in the VB editor in MS Excel 2010. Sadly I have no idea how to convert the VBS code so VBA is able to ...
2
votes
3answers
204 views

Excel VBA - Is it possible to automatically input VBA code when a new sheet is generated?

Is it possible to have a new Excel sheet created and then VB code automatically put in that sheet? Here is what I have done so far. A sheet called Template has the input for all of the information ...
2
votes
1answer
67 views

Excel: How to call functions in Sheet modules from VbScript

Using VBScript, I'm trying to run a subroutine that resides in one of the code modules. Now this particular sub calls several other subs/functions, including few that reside on the sheet modules. And ...
2
votes
1answer
161 views

Unable to Copy huge volume of data in Excel in VbScript

I'm working in VbScript to Copy all the worksheets of all the files in a folder in a single workbook and save it. I have 4 workbooks. Each contains 1 worksheet. worksheet 1 = 1 MB, worksheet 2 = 19 ...
1
vote
2answers
667 views

Copy Worksheet to a New WorkBook in VbScript - “the object invoked is disconnected from its clients” error code: 80010108

I'm new to VbScript. I'm trying to copy all the worksheets in a folder to a single workbook. It is getting copied but it is showing an error before saving the new workbook. error:"the object invoked ...
-2
votes
2answers
3k views

Copy range from one sheet to another vba

I would like to copy and paste this range B15:B25 to another sheet on excel. I have tried to record a macro to use the code but the macro uses: Active.Worksheet.
0
votes
1answer
310 views

Running a VBA excel macro at a certain time

Trying to figure out the best way to kick off an excel macro at a certain time. I found a few suggestions, but I still have plenty of questions on the idea and was hoping you guys could provide some ...
0
votes
0answers
90 views

creating folder and sub folders structure in excel

Could any one help with VBScript that copy the folder and sub folder structure of a desired folder or drive. I don't want to display the path of folders just folder name and in the next row sub folder ...
1
vote
1answer
314 views

Excel VB error Application.Undo & ActiveSheet.Protect

Curious if anyone had a solution to this. Here is my code below and I thought it was working perfectly. We were using it for a long time and someone else pointed out to me something they do all the ...
1
vote
3answers
217 views

Run Excel macro when excel is not installed

I have a excel workbook. I need to show it as a HTML page that will be refreshed automatically(say every 2 minutes). For that i need to run the calculations on every sheet and then save as HTML. I ...
1
vote
2answers
96 views

How to remove the timestamp from the filename?

Hi I'm writing a script to rename and move the generated files to a folder. The file name of the generated files has the time stamp appended at the end of it. Eg: Apache34-22-09.bak ...
1
vote
1answer
450 views

Use VBA/VBSCRIPT to access Textbox embeded in the form tags of Internet Explorer Object

I am using VBA to access a username/password box on a webpage that has a form <form name="form1" method="post" action... I have successfully used the code below to login to several sites that ...
0
votes
1answer
223 views

excel copy cell from a closed workbook.

I am trying to Copy data from a cell in a closed workbook into another workbook without opening the original one. the code i have show far... works but i need to be able to write the data to a ...
0
votes
1answer
56 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
220 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 ...

15 30 50 per page