Recent content by Paul Wagner

  1. P

    Convert CSV to XLS in VB

    Thanks rolaaus. Yes, there was some other intermediate processing of the variables (like removing "-" from an account number, trimming some fields, parsing others, etc.) At this point it is nearly finished. I'm going to try to put the progress bar in as it does take "some" time and that...
  2. P

    Convert CSV to XLS in VB

    Here's a footnote to the above code. Instead of processing the columns separately, evertime I read the row, I load the values I want locally, thus: Emplid = objXsheet.Cells(xRows, 1).Value Name = objXsheet.Cells(xRows, 2).Value PayrollCycle = objXsheet.Cells(xRows...
  3. P

    Convert CSV to XLS in VB

    Great news! It's working. Here is the successful code for all to use. I think this thread will hang around awhile. Many Thanks rolaaus and Pat! '----------------------------------------------------------------------- ' CONVERT CSV FILE TO XLS AND PROCESS XLS ROWS AND COLUMNS ' Opens Excel...
  4. P

    Convert CSV to XLS in VB

    Yes, when I use Set objExcel = New Excel.Application Set objXsheet = objExcel.Worksheets(1) I get the message "Method 'Worksheets object' _application failed" and the msg box "Application defined or Object defined failure" I even changed it to Set objXsheet = objExcel.Worksheets("Sheet1")...
  5. P

    Convert CSV to XLS in VB

    Thanks Pat: Doesn't Transferspreadsheet load the xls into a table? I can't do that because the csv has rows 1-18 of header information that must be eliminated prior to looping the actual data.
  6. P

    Convert CSV to XLS in VB

    There is definitely information in the XLS file, I can open it laden with data (of course it says locked for read only as I am terminating debug prematurely No, the csv is, and always will, be about 600 rows). And I get the message "the file exists, do you want to replace it?" So I'm at a loss.
  7. P

    Convert CSV to XLS in VB

    I'm getting an error at the objXsheet.UsedRange.Rows.Count "Object variable not set": How do I set it? And do I need to Save the file in order to access it in the ActiveWorkbook.SaveAs FileName? Dim appExcel As Excel.Application Dim Pathfile As String Dim strCSVPath As String...
  8. P

    Convert CSV to XLS in VB

    This is great. One last question: I was thinking I don't really need to save the file, I'm only using excel to properly format the CSV (since I was unable to Import the csv file fields using the Split function delimited by commas...all numerics get split too, sigh) Anyway, how do you loop the...
  9. P

    Convert CSV to XLS in VB

    Well I found that I don't need any of the With logic. And it is creating the file perfectly with the code below. However, when I go to delete the file Windows balks that it is locked by another process. So, after I do what I need to do with the file (reading/process rows) how do I close it...
  10. P

    Convert CSV to XLS in VB

    OK, but when I take your code and 'rewrite' mine with Excel open I get the error "object variable or With Block variable not set" (I'm sure it's just green ignorance) Public Sub ConvertCSVtoXL(strCSVPath As String) Dim appExcel As Excel.Application Dim Pathfile As String Dim objExcel As...
  11. P

    Convert CSV to XLS in VB

    (Scroll to the bottom post for final answer & code) I'm trying to piece together other techniques and here's what I have so far, but it's stuck on Excel reference in Shell (No Active X component). There's got to be a cleaner way to do this! HELP. Public Sub ConvertCSVtoXL(strCSVPath As...
  12. P

    Subform Cmd button ignored

    I just posted this to the website...makes it a lot easier for you. http://www.globalconnectionsconference.com/screenshots Thanks
  13. P

    Subform Cmd button ignored

    I have a subform which already uses a combo box w/code in the After Update event. This code works. When I add another command button to the same form in the On Click event, Access seems to ignore it. I've inserted a test Msg but that is ignored. Also I believe that debug is somehow turned...
  14. P

    Clearing a filter

    This works, but only once. After that it gives 1 (Filtered) below and refuses to accept the cursor into the Guest Search box. Did that work for you?
  15. P

    Clearing a filter

    Sure. The file is quite small and attached. Maybe there's something else holding it up. Your advice is certainly appreciated. Thanks, Paul
Top Bottom