I wrote a script to copy data from a series of CSV files in a directory into an excel spreadsheet. When I'm done copying the date I close the CSV files. I am trying to figure out how to close the files without being prompted to save the file. I have tried the following:
importWkbk.Save...
I figured it out. I needed to reference Microsoft Scripting Runtime library. For future reference here is the link that I used:
http://www.exceltip.com/st/List_files_in_a_folder_with_Microsoft_Scripting_Runtime_using_VBA_in_Microsoft_Excel/446.html
I'm working on a script to import all of the files in a given directory into my access DB. Basically what I am trying to do is get a list of all the files in the given directory and then loop through all of those files and import their content into the DB. I found an example to be used for...
Hello,
I'm having an issue with a piece of my Access VBA Module. The Module imports data from a Microsoft Word form into the Access DB. In one part of the module I am trying to set a variable = a date field on the form:
CrsDivApprvDt2 = IIf(IsDate(doc.FormFields("CrsDivApprv2Dt").Result)...
I'm looking for a way to link a WOrd file to an Excel File. Basically what I have is an excel file which tracks 8 fields for certain issue #'s. Then I have a word file that has some additional information on these issues. I would like to set it up so that the word file references the fields...
One other thing. I am running Windows XP Pro on the desktop and the laptop which can connect to the printer. However on the laptop that I'm having trouble connecting to the printer I am running Windows XP Home Edition.
I am having some trouble connecting to a shared printer with a laptop. I can connect to the printer with one of my laptops but the user name is the same as on my desktop which the printer is connected to. I even tried mapping a drive to the desktop from the laptop in question but I get a...
EXEC SP_NAME;
I also tried adding the database name and owner as such:
EXEC DBNAME.dbo.SP_NAME;
With the first call I received an error saying I could not call a select query but there is no select query in the SP. With the second the error said could not find the object 'DBNAME'. Note that...
I am trying to execute a stored procedure in a DTS package but I keep getting an error. I am using the Execute SQL task object with an SP that has a few Update queries and 1 Delete query. When I try to test this object the error it gives me says that I can't execute a select statement. Any...
I ran into a problem with a string that I was trying to pass through the HTTP header. The string included the character '&' and since that is the character used to seperate elements my string is cut in half. Is there any special character I can use to pass '&' through the HTTP header?
I am new to VBScript Regular expressions and I am trying to parse a string which includes the lastname, firstname of a user. I tried "LASTNAME\, [A-Z]" and "[A-Z], \FIRSTNAME" but the problem I ran into is that with the last name pattern unless the full last name is used as the search string...
I am running into a problem when using the left join table. I have one table (table1) that has a count of items and the expense code assigned to that count of items. I have a second table (table2) that gives me additional information related to the expense code. I am using a left join because...
Hey Guys,
Thanks for your help. I was able to resolve this problem by creating a temp array 1 position bigger than the initial array and then used reDim (without preserve) to make the original array bigger. Finally I copied the data from the temp array to the originally array again.
I'm having some trouble with a redefining the size of a 2 dimensional array. I keep getting the following error:
Microsoft VBScript runtime error '800a0009'
Here is an example of my code:
dim contArr() 'dynamic array
reDim PRESERVE contArr(0,1) 'set initial size of the array
contArr(0,0) =...
I was trying to check to see if there was anything in the array. I think I found a solution but let me know if you have something better. See below.
dim myArray()
dim myArray(-1)
if ubound(myArray) < 0 then
'There are no values in my array
end if
I am trying to figure out whether or not an array has a value. I thought I could do this buy taking using the ubound function but if the array has nothing in it I get an error with the ubound function. Then I thought I could use the isArray() function but since I declare my array as a dynamic...
How to I check to see if a recordset from a SELECT query is empty? I am getting the following error:
error '80020009'
Exception occurred.
And the only reason I can think of is because I have an if statement that checks a value from a recordset that is empty.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.