I'm using the following code to import data stored in a .txt file into an Excel (XP) file:
With ActiveSheet.QueryTables.Add(Connection:="TEXT;" & Filename, Destination:=Range("A8"))
.FieldNames = True
.PreserveFormatting = True
.RefreshStyle = xlInsertDeleteCells
.SaveData =...
when you use the same code over and over and over again and need to make a simple change over and over and over again you will begin the path towards enlightenment ...
when you make the same simple change in all but one or two locations that need to be changed you will be farther along the path...
I have an excel file (XP) that when I try to compile on another user's computer stops at lines using the UCase function.
When I look at the list of selected References, all of them match what I have.
Perhaps the problem is that the particular dll file is corrupted. However, I don't know...
I have some code (in Excel 2003) that takes a chart and converts it to a picture so that the user can copy it to another application (e.g. Power Point, Word, etc). The copy and paste works fine. However, when you print out the document the Axis Titles on the left and right sides of the chart...
A while back I created an .xla file using the instructions in http://support.microsoft.com/kb/211563/EN-US/
I need to modfiy the file's comments.
When I try to go to the file's properties (as per step 2 in "How to Save the Workbook as an Add-In File"), it is not an available option.
Does...
Thanks, though this doesn't seem to work.
Workbooks.Open (datafile)
Workbooks(datafile).Windows(1).Visible = False
On the first line, the file opens.
But then I get a "subscript out of range" error message on the second line.
Is there a way to hide a .xls file that is opened using Workbooks.Open?
After I open the .xls file from another .xls file it becomes visible; and I don't want it to be visble.
Thanks.
I created a test xla file and wrote a simple function and subroutine which I call from another excel file. According to a book I have there are two ways I can call a subroutine:
1. Application.Run "filename.xla!subname"
This method works.
Another way is to just call the subroutine using...
Thanks.
Though I don't have any add-ins.
I am querying data from a second .xls file using ADODB. Could that be a cause?
Dim cn As ADODB.Connection
Set cn = New ADODB.Connection
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
With cn
.Provider =...
I have an .xls file (winXP, XL03) that has the code password protected using the VBAProject password.
Some of the users get asked for the password even though they are not going into the IDE. Sometimes it pops up after they have closed out the file.
Anyone have any idea about this?
Thanks.
The following code brings in data from a text file. It's supposed to just paste the data in the destination range. For some reason it's inserting columns (on some user's computers - right now users are using XP and XL03). Any idea what could be causing the columns to be inserted?
With...
I have some ADO code within an Excel file (2003) to query data from another Excel file (see below). My question is, how do I grab data from within the same Excel file? What do I set as the connection?
Dim cn As ADODB.Connection
Set cn = New ADODB.Connection
Dim rs As...
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.