Search results

  1. J

    Solved Create Excel Pivot Table From Access VBA

    i am attempting to add a worksheet, and create a pivot table.
  2. J

    Solved Create Excel Pivot Table From Access VBA

    Same error if i change the code to pivotWS.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Quantity!A1:G321`", Version:=6).CreatePivotTable _ TableDestination:="Test!A3", TableName:="PivotTable2", DefaultVersion _ :=6 am i adding a sheet called Test? I thoguht i was...
  3. J

    Solved Create Excel Pivot Table From Access VBA

    My code hits this line and gives me the error Object doesn't support this property or method pivotWS.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "QuantityR1C1:R1728C9", Version:=6).CreatePivotTable _ TableDestination:="Test!R3C1", TableName:="PivotTable2", DefaultVersion...
  4. J

    Solved Create Excel Pivot Table From Access VBA

    Hah - good catch Dim wb As Excel.Workbook Dim xlApp As Excel.Application Dim pivotWS As Object Set xlApp = CreateObject("Excel.Application") xlApp.Visible = False Set wb = xlApp.Workbooks.Open("C:\Remeediation.xlsx", False, False) Set ws = wb.Sheets(1) Set pivotWS =...
  5. J

    Solved Create Excel Pivot Table From Access VBA

    I'm getting invalid or unqualified reference on this line (and I assume the subsequent) .ColumnGrand = True I tried to do . and see if intellisense would open up but it is not :(
  6. J

    Solved Create Excel Pivot Table From Access VBA

    Oh yes, this is what I have (yes I am running in Access) I don't understand the RXCX yet as that data will be dynamic in weeks to come, but just to get this done for now i'm leaving it hardcoded Dim wb As Excel.Workbook Dim xlApp As Excel.Application Dim pivotWS As Object Set xlApp =...
  7. J

    Solved Create Excel Pivot Table From Access VBA

    This is what I have tested thus far -i know i left one .Select in there as I wasn't sure how to change that one :/ Sub Macro2() Set pivotWS = wb.Sheets.Add(After:=wb.Worksheets("Test")) pivotWS.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _ "Quantity!R1C1:R1728C9"...
  8. J

    Solved Create Excel Pivot Table From Access VBA

    I have one last requirement that I need. And that is to create an excel pivot table from access vba. Using the macro recorder in Excel, thhis is what it generated. How would I change this to run with Access? Sub Macro2() Sheets.Add...
  9. J

    Solved Convert An Excel Macro To Run In Access VBA

    oh wait. same thing. should be excelapp
  10. J

    Solved Convert An Excel Macro To Run In Access VBA

    FROM MEMORY!!!??? that is amazing! I hope I am one day this good Now I am getting the error Compile error: Method or data member not found on this .Goto and this is full line Application.Goto ws2.Range("A1"), True
  11. J

    Solved Convert An Excel Macro To Run In Access VBA

    When I try to run the function, I get this error Compile error: Method or data member not found On this .CutCopyMode full line is Application.CutCopyMode = False
  12. J

    Solved Convert An Excel Macro To Run In Access VBA

    I am getting an error of: Compile error: Expected: end of statement On this line Set ws2 = wb.Sheets.Add After:=wb.worksheets("Data") and it highlights this After
  13. J

    Solved Convert An Excel Macro To Run In Access VBA

    With 1 query...meaning an access query? I'm needing to keep it all done in Excel - but let access vba do the leg work
  14. J

    Solved Convert An Excel Macro To Run In Access VBA

    I am altering a spreadsheet from access vba. I have this Excel macro that makes a portion of the required changes, but this is excel vba not the access vba. Can someone provide me with what this code would look like if it were access vba to control excel? Columns("H:I").Select...
  15. J

    Solved Access VBA To Concatenate Excel Cells

    YES! That is it! Thank you for your patience and support, it is much appreciated!
  16. J

    Solved Access VBA To Concatenate Excel Cells

    That seems to be giving valid values now... last row = 1728 lColumn = 7
  17. J

    Solved Access VBA To Concatenate Excel Cells

    Yes row 1 has headers. Only change I made was I removed a duplicate variable declaration from your code, and changed the For line so it was valid syntax Function Test() Dim wb As Excel.Workbook Dim xlApp As Excel.Application Dim x As Long Dim strValue As String Dim rng As Object, ws As...
  18. J

    Solved Access VBA To Concatenate Excel Cells

    Attached is what it shows
  19. J

    Solved Access VBA To Concatenate Excel Cells

    stepping through the code lastrow = 1728 lColumn = 1 then it hits the line strValue = Right(strValue, Len(strValue)-1) And gives the error Run-time error '5': Invalid procedure call or argument It hits the line For x = 2 To lColumn And immediately jumps to the line above in the...
  20. J

    Solved Access VBA To Concatenate Excel Cells

    I'm getting an error on the line For x = 2 -lColumn 'start at col B it says Expected: To
Back
Top Bottom