Search results

  1. fpendino

    Manipulate Excel from Access

    Private Sub matData() '-------Declare Dim lngColumn As Long Dim xlx As Object, xls As Object, xlc As Object, xlw As Object Set xlx = CreateObject("Excel.Application") xlx.Visible = True Set xlw = xlx.Workbooks.Open("C:\access\matlevels.xls") ',,True Set xls = xlw.Worksheets("sheet1") '---...
  2. fpendino

    Range referencing in Excel

    Try using this. objXL.Cells(1, 1).Value = 20
  3. fpendino

    Output Query results and paste into an excel sheet automatically

    That shouldn't have an affect on what is happening until it tries to execute that macro. The error you're getting is when it opens the recordset, unless this is another issue. When you view your macros, are you viewing all Macros In: All Open Workbooks? That normally happens when you have...
  4. fpendino

    Use ListBox Rowsource to export .xls

    Hey, and for future thought, I've been workin with some other threads that have had needs to export to Excel. I posted a Sample Database a few months ago that you can set Excel as an Object and upon doing so you can access/export/format and do whatever in Excel by doing so. You could use...
  5. fpendino

    Use ListBox Rowsource to export .xls

    Congrads. Glad to help. Hope all else goes well.
  6. fpendino

    Output Query results and paste into an excel sheet automatically

    Well.. that does help as far as what I was wanting to see, but it doesn't help as far as figuring why the heck it's giving that error message. It seems like it's passing the right info, but for some reason it doesn't like it. Let's see if you have all of the right references checked. Right...
  7. fpendino

    Use ListBox Rowsource to export .xls

    OK.. This should fix that as I just tested it and got the same error. Make sure you have the Code Page up, go to Tools--References and check the Microsoft DAO 3.51 Object Library. Your library version may be different depending on your version of Access, but just check the latest version...
  8. fpendino

    Use ListBox Rowsource to export .xls

    Dim qryEX as Querydef getRowSource = me.salesbox.rowsource 'You must specify the name that you want to save the query as. The querydef will create an actual Query. This will save the query as tempQuery. Set qryEx = currentDb.CreateQueryDef("tempQuery", getRowSource) 'You can't transfer the...
  9. fpendino

    Output Query results and paste into an excel sheet automatically

    I changed my query names to match yours and I'm not getting any errors. Do me a favor. Before you press Run, go to the code and press F8. Then press the run button. This allows you to STEP through the code. Slowly keep press F8 and let me know when it stops and gives you the error...
  10. fpendino

    Output Query results and paste into an excel sheet automatically

    Ok.. Assuming that you complete the first two steps, I have created a database containing a form and module that contains the code necessary to accomplish what you are wanting. Unzip the database, it is in Access 97, and should convert OK to newer versions. Import the form called 'frmExport'...
  11. fpendino

    Populating data in MS Graph Chart by VBA

    You will probably have to declare the graph as an object. The example that you posted seems to be declaring it as an object, calling it 'mychart'. I don't have the exact code on how to do this, but I will try to see what I can find. Hope this helps point you guys in the right direction.
  12. fpendino

    Output Query results and paste into an excel sheet automatically

    There will be a few steps in to getting this to work the way you would like. Like I said before, there are a couple of ways to do this. 1. Create a template Excel Workbook, with your Four tabs. I usually name my template file the same as the file I'm going to use and just add template behind...
  13. fpendino

    Macro/VBA Code Open CSV file, save as xls, run excel macro

    Simply, Don't worry I've been doing this for about 4+ years off and on, and I still learn new things everyday. I only have 50 posts on here now since 2001, because I can usually find what I need by searching for it. Over the past year, my need to export to Excel has increased a lot, so...
  14. fpendino

    Output Query results and paste into an excel sheet automatically

    Shawn, This is very possible, as I have done much of this to make some of my daily processes very simple and quick. One question though, since you are fairly new to this, is that when you copy and paste from Access to Excel, can you paste the whole query into a particular spot on the...
  15. fpendino

    Count & Group a recordsource

    Happy, The Access Help File does go into how to setup 'QueryDefs' pretty well. Just do a search for 'Create QueryDef' and it should be the first thing that pops up. Anyway's, here is an example that I found in my help file that shows some code for it. The following example creates a new...
  16. fpendino

    Macro/VBA Code Open CSV file, save as xls, run excel macro

    I would say that Simply's idea is good, but there are some down sides. With using Access to 'Shell' Excel, you have less control over Excel programmatically from Access. With the Send Keys, I try to stay away from that, because when I declare Excel as an Object, I can let my programs run...
  17. fpendino

    Count & Group a recordsource

    One idea is to turn that sql string into a QueryDef, which stores that SQL and saves it as a query(Check the help file for QueryDefs). Then you can query off of that stored query and delete it once you are done with it. Hope that helps. Frank
  18. fpendino

    Macro/VBA Code Open CSV file, save as xls, run excel macro

    Check out this link. I posted a sample database that shows how to interact Excel and Access. You have to declare Excel as an object. You can't just open/Shell the Excel program. http://www.access-programmers.co.uk/forums/showthread.php?t=63291
  19. fpendino

    Moving a record from one table to another

    Assuming that both tables contain the same fields or similar fields, yes this can be done. Depending how much you understand there are a couple of ways to accomplish this. Your best bet is to create a List Box or Combo Box on your Form so that you can view the data in your tables. Create an...
  20. fpendino

    access to excel automation...seem to still have a hidden excel instance....

    You shouldn't need Excel in this process at all. You can import the Text file directly into Access and should be able to automate the process with a Macro or VBA. Try importing the text file into Access, save the 'Import Specifications'. If unfamiliar see this link...
Back
Top Bottom