• WSAbraxus

    WSAbraxus

    @wsabraxus

    Viewing 15 replies - 151 through 165 (of 171 total)
    Author
    Replies
    • in reply to: Excel Automation issue (A97/XL2002) #757581

      I am trying to open an Excel application, then a workbook, then get data from the workbook, then close the workbook and then close Excel.

      When my code is done running, Excel still shows in my task list.

      Any ideas what is going on?

      Morgan

      Sub ImportNewReport()
          'Used to import the daily report
          Dim strFileToImport As String
          strFileToImport = "C:Documents and Settingsmerick01.AD" & _
              "DesktopPLP ProjectsToImport1121Daily PLP Team Projects.xls"
          
          'Open the excel report for importing
          
          Dim objXL As Excel.Application
          Set objXL = New Excel.Application
          With objXL
              .Visible = False
              .Workbooks.Open strFileToImport
              .Range("A2").Select
              Dim dteFileDate As Date
              dteFileDate = ActiveCell.Formula
              
              MsgBox dteFileDate
              
              
              
              .Workbooks.Close
              .Application.Quit
              .Application.Quit
          End With
          
          Set objXL = Nothing
      End Sub

      Edited by HansV to break extremely long line that caused scrolling.

    • in reply to: Number of minutes between 2 times (Excel XP) #730650

      Cool!!

      Thanks a ton. My brain isn’t working this morning.

    • in reply to: Number of minutes between 2 times (Excel XP) #730651

      Cool!!

      Thanks a ton. My brain isn’t working this morning.

    • in reply to: Decimal to Hex (A97) #671368

      It will be stored as a string.

    • in reply to: Opening a .html opens AOL (IE6 Win2K) #665305

      Thanks!

      I’ll have her give it a try.

    • in reply to: Excel Is changing my cell contents (XP) #662316

      Thank you for the reply.

      I was afraid of something like that. I am going to try putting a letter at the end of the credit card number, 4579637981576789X, for example, and see if when they paste it, the X is allowed or not. It is my hope that the billing system is trapping for only 16 digits and lets the CC number in but not the X.

      Thanks again!

    • in reply to: Why not seperate lines? (Access 97 VBA) #657399

      I ended up writing a work-around:

      Sub ImportTest()
          'Open the file to import
          Dim intFileNum As Integer
          intFileNum = FreeFile
          
          
             Open "Myfile.txt" For Input As #intFileNum
          
          Dim strFromFile As String
          
          While Not EOF(intFileNum)
              Line Input #intFileNum, strFromFile
              Dim intLength
              For intLength = 1 To Len(strFromFile)
                  Dim strIndividualRecord As String
                  If Asc(Mid(strFromFile, intLength, 1)) = 10 Or _
                     Asc(Mid(strFromFile, intLength, 1)) = 13 Then
                      'End of the record
                      If Len(strIndividualRecord) > 0 Then
                          Debug.Print "-----------"
                          Debug.Print strIndividualRecord
                      End If
                      
                      strIndividualRecord = ""
                  Else
                      strIndividualRecord = strIndividualRecord + Mid(strFromFile, intLength, 1)
                  End If
              Next intLength
          Wend
          Close #intFileNum
          MsgBox "Done!"
      End Sub

      Thanks for all the suggestions!

    • in reply to: Outlook to Outlook Express (2000) #654487

      Worked like a charm!

      Thank you.

    • in reply to: Run a macron in a workbook that is NOT open (Excel 97/2002) #651533

      I know how to load the workbook with the macro in it, but I don’t want the sheets in that WB to be seen.

      I just want it in the background.

    • Man…

      For the first time ever I think I used the object browser and saw Application.Dialogs but somehow missed .DisplayAlerts

      Thanks for the assistance!!

    • in reply to: Since when is ’12a’ a date?? (A97) #639845

      Great thanks!!

      That code worked like a champ.

      I appreciate the help!

    • in reply to: Can’t use functions in queries (A97 Win2K) #632828

      That is the ABSOLUTE WEIRDEST thing I have EVER seen in my life…

      Oddly enough, it worked.

      I appreciate the help. File that one under Odd Things You Might Try…

      Thanks a TON!!

    • in reply to: Can’t use functions in queries (A97 Win2K) #632629

      Absolutely. That’s the first thing I checked.

      In addition, I changed her installation of Access to include all options, in case something was missed in the initial install. (This has worked for me with other issues in the past)

      This one REALLY has me stumped. It’s tough to tell her “It works for me just fine…” when it won’t for her.

      It’s not just her PC, either. It’s everyone in her group that is using it. They all have similar PC configurations.

      Could there be a problem with the Corporate image of Win2K that is causing it? How about Excel 97 being in the mix with some Office XP?

      Sign me Extremely Frustrated,

    • in reply to: Can’t use functions in queries (A97 Win2K) #632616

      I understand. This is not my PC, and the individual it is for is not the most technically savvy…

      I use a query to output some data to Excel via DoCmd.OutputTo acTable, “qryMyQuery”, “MicrosoftExcel(*.xls)”, “c:Test.xls”, False, “”

      The query uses the CInt, Left, and Len functions. Here is the exact message:
      Function isn’t available in expressions in query expression ‘Cint(Left([Code],Len([Code])-1))’.

      This query worked before the user got upgraded to Win2K. The also got Office XP with the following exceptions:
      Kept Access 97
      Kept Excel 97

      Any pointers are greatly appreciated!

    • in reply to: Can’t use functions in queries (A97 Win2K) #632213

      It’s not on my PC so I can’t give the exact error number & desc, but it something like “Function not available in query…”

      Any query along the lines of:
      SELECT UCase([FirstName]) FROM MyTable

      is failing…

    Viewing 15 replies - 151 through 165 (of 171 total)