Thank you guys for your helpful hints. I am going to rerun the whole thing and see where the value of the service area is changing. As far as the Excel file being left open, I think If I use On Error Resume Next it'll eliminate the problem since it'll goto the line where It says:
xwb.Close
xl.Quit
Well, The first Service Area in the MSA_SA list was "Capital SA"
so, the first worksheet was named "Capital SA RENEWAL".
Then MSA_SA took on the 2nd value as the MSA_SA "Central SA" so, the worksheet would be "MSA_SA RENEWAL" or "Central SA RENEWAL"
So, I really dont know what the problem is OR...
Hi PHV, I was checking everything if it works. It does with the new rs declaration.
I am getting the subscript out of range error for this line:
Run-time error '9': Subscript out of range
highlighted line: Set xws = xwb.Sheets(ServiceArea)
I already created an Excel file 'PATH' with titles for...
Here's what my whole code looks like:
Option Compare Database
Private Sub cmdExport_Click()
Dim ReportType As String
Dim Path As String
Dim BegDate As Date
Dim EndDate As Date
Dim SQL As String
Dim db As Database
Dim MSA_ARRAY
Dim MSA_SA
Dim ServiceArea As String
Dim xl As New...
I want to start outputting Tables to Excel on the 3rd line i.e. A3. Is there no other way that I can do that??
The reason I'm doing this is because I am adding a TOTALS line in the begining in the Excel Template I'm saving the Access Tables into. The TOTALS line is in the begining (A2:P50)...
I tried using Quotes instead: "B8:H50"
It gives me the following error:
Run-time Error'3673':
This table contains cells that are outside the range of cells defined in this spreadsheet.
I really need to paste the Table on the 8th line down in the Excel Spreadsheet.
Also, my data is static. Thats...
Hello,
I am trying to run this TRANSFER SPREADSHEET macro, but I think my syntax is wrong in the end for the RANGE option:
Path = txtPath.Value
DoCmd.TransferSpreadsheet acExport, , MSA_SA & " RENEWAL", "" & Path & "", True, (B8:H50)
GOTO Design View of the Table
On the Top Half of your screen, U'll see a list of Your Table Fields alongwith their respective DataTypes on the RHS.
After Selecting Number, On the bottom half of the screen, there are GENERAL properties. Just pick Decimal Places '2' instead of AUTO. Do the same...
Thanx Zion7 for your help.
I've a Question:
I have this Array:
MSA_ARRAY = Array("Altamont", "Bayfung", "SilverCreek" _
"Blossom", "CanyonLakes", "Valle", "EdenPalms")
I want to call values from a cloumn named "SA" from a Table named "tblRegion". What should be the Syntax for that.
MSA_ARRAY...
Hi, I wanted to save the following Query, but only wanted to save Queries with Data in them since some of these Queries will have no Data in them. I wanted to save the Queries with DATA in them. Could you let me know what Argument should I be using in my DCount Statement??
SQL = "SELECT A.CID...
Thanx, It does return only the Queries that have Data in them. However, I wanted to return all the Branches in the Region ("Report"). Not just the Filled Ones.
If I am selecting Region "Emory" from the Report Combo Box, I want to return all the Branches that are present in that Region, "Data or...
OK PHV, it is working now. All of the Branches saved. One problem:
It is saving all of the Branches, even the ones that aren't in the cboReport.Value.
cboReport.Value have three REGIONS:
Emory, Large, Woodside.
There is more than one branch that lies within these regions. The Tbl1 I used in...
What's MSA_Branch
Do I have to Actually type in Each Branch Name to do this??
Also, just wanted to mention, earlier Code works to the point that it saves the Query alright with all the fields of the table that I wanted, its just empty.
Also, the excel file is also populated with different...
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.