Search:

Type: Posts; User: MNpoker; Keyword(s):

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    6,462

    Re: VBA: SQL Server / Query timeout

    Anymore help on this?

    I have the following code (In SQL analyzer this takes 49 seconds, though I do have another one that takes 15 minutes I will need later)

    This has worked fine for every...
  2. Replies
    3
    Views
    410

    Re: Excel Memory usage problem

    Could you go further into this? I am having major issues with an Excel file getting to big.

    I saved the file in 2003 format then resaved in 2007 and that seemed to help.
  3. Re: Save without Macros then delete old file (2007)

    Got it !!!!!!

    ActiveWorkbook.SaveAs Filename:=strFullPath & "\GeneratedReports\" & ReportName, FileFormat:=51, CreateBackup:=False
    Kill strFullPath & "\GeneratedReports\" & ReportName &...
  4. Re: Save without Macros then delete old file (2007)

    One more try.

    Thanks!
  5. Re: Save without Macros then delete old file (2007)

    Sorry Should add I want to also delete the macroenabled workbook that was created.
  6. Save without Macros then delete old file (2007)

    I have reports that go to customers and I want to save the file without macros for sending.

    There is a 'main' file that runs analyses then saves a copy. The copy then has certain sheets changed...
  7. Replies
    6
    Views
    1,271

    Re: Error (Trying to Load Excel data To SQL)

    I made some changes to the code: Still getting same error though.


    VtSQL = "Create Table TempDesc_Bldg (BLDGSCHEME char(5), BLDGCLASS Char(5), BLDGDesc Char(50))"
    ObjCommand.CommandText...
  8. Replies
    6
    Views
    1,271

    Re: Error (Trying to Load Excel data To SQL)

    Bump for one more try.

    My code is INDENTICAL to what MS shows to do ??

    Use ADO and SQLOLEDB
    When you are connected to SQL Server in an ADO application by using Microsoft OLE DB for SQL Server...
  9. Replies
    6
    Views
    1,271

    Re: Error (Trying to Load Excel data To SQL)

    Thanks it's SQL and here is more of the Code:


    Sub RunQueries()

    ' Runs The Report
    ' ----------------------------------------------------------------------------------------------

    ...
  10. Replies
    6
    Views
    1,271

    Error (Trying to Load Excel data To SQL)

    I got this from Microsoft (I am using Excel 7.0).


    ' Load The description Tables into SQL
    'Import by using OPENDATASOURCE.
    VtSQL = "SELECT * INTO TempDesc_Bldg FROM " & _
    ...
  11. Replies
    6
    Views
    950

    Re: Load SQL query into a recordset

    Sorry for the confusion, I had it set up previously to get data from Access but speed became an issue and I need to go directly to the SQL box.

    So what I am doing is startying with the Access code...
  12. Replies
    6
    Views
    950

    Re: Load SQL query into a recordset

    GOT IT!!

    Simply had to change it to Set rst = objCommandExecute
  13. Replies
    6
    Views
    950

    Re: Load SQL query into a recordset

    When I tried using that one (In excel) I get the following error:

    Run-time error '424'
    Object required
    AND it stops at this line ----> rst.Open VtSQL, CurrentProject.Connection,...
  14. Replies
    6
    Views
    950

    Load SQL query into a recordset

    I can do the following when running Queries from access to put them in Excel.

    ' PUT QUERY TO RECORD SET
    Set rst = New ADODB.Recordset
    rst.Open VtSQL, CurrentProject.Connection,...
  15. Re: Simple Public Function? Have the formula = the value in the cell 1 to the left

    Say I put = Publicfunction1() in cell B5



    First find the value in A5 (this is the denominator)

    If there is a value in A4 then that value is the numerator if not
    If there is a value in A3...
  16. Simple Public Function? Have the formula = the value in the cell 1 to the left

    I want to write a public function where the value is the cell one to the left.

    Help!

    Actually it's a bit more than that but I think that would get me there.
    It's really the next cell with a...
  17. Replies
    2
    Views
    421

    Re: sum if macro VBA

    Do While Column 1 is not blank
    z = z + 1
    If Range("A1").offset(z,0) = 'x' Then (Other Sheet) Range = what is on the other sheet **
    Loop

    ** There are a variety of ways to do this.

    Next...
  18. Re: How do I use Conditional Formatting to get rid of #DIV/0!?

    Note in 2007 they did improve one thing:

    If(Iserror(A/b)),"",A/b)

    Can now be written

    Iferror(A/B,"")
  19. Replies
    2
    Views
    395

    Re: 'If' and 'And' statements

    You need to put the qualifier in each part of the AND statement.

    If(And(statement1>Statement3,Statement2>Statement3), answeriftrue, false)
  20. Replies
    1
    Views
    418

    Simple name reference question?

    Objects:
    Form Named: FormMaster
    Combo Box in Form named: PortfolioSelection

    I want to refer to this in VBA how do I write it out?

    Works Fine here


    Private Sub RunReports_Click()
  21. Replies
    1
    Views
    386

    Re: Get the Count of Records From a Query

    Got it, what a pain.
  22. Replies
    1
    Views
    386

    Get the Count of Records From a Query

    How can I get the number of records from the following?


    VtSQL = ""
    VtSQL = VtSQL & "SELECT QRY_SecondaryDescriptions.Peril_Number, QRY_SecondaryDescriptions.Secondary_Number,...
  23. Replies
    6
    Views
    625

    Re: Dealing with null filed values

    Thanks for this. If I have a SQL Statement:

    VtSQL = ""
    VtSQL = VtSQL & "SELECT Qry_SecondaryAfterFilter.Peril_Number, Qry_SecondaryAfterFilter.Secondary_Number,...
  24. Replies
    1
    Views
    18,615

    VBA set up - calling Modules

    Questions:
    - Once I name a variable in One module how do I get it to keep it's value when calling another module?
    - Do I need to keep using Dim in each called module?

    - Is there a much better...
  25. What is the wrong with my code? (Open Connection To Excel From Access ADO)

    Very frustrated. I have set this up already in Excel to go to Access but it seems like when I ask questions here I get told to do things in Access but nothing seems to work!

    I want to open an...
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4