• WSCecil

    WSCecil

    @wscecil

    Viewing 15 replies - 91 through 105 (of 105 total)
    Author
    Replies
    • in reply to: Return codes (VB 6) #611834

      Actually I like the ExitProcess better. As long as I make sure everything is cleaned up, i.e. references to objects set to nothing, it appears to be OK. I watched the performance monitor and did not see any increasing thread counts, memory usage, etc. Using the ExitProcess API Function, the return code is returned to the calling environment. Though it is not likely, it is possible for two operators to call this process at once.

      I did notice that Daniel Appleman recommends against using ExitProcess.

    • in reply to: Percentage (Excel 2000) #611789

      I would use array formula to solve this problem. If you post a 10 to 15 line sample, I believe I can provide what you are looking for. From your description, I cannot visualize what you have, i.e., what is a semester? Is it derived from the section number?

    • in reply to: Return codes (VB 6) #611671

      What I am trying to accomplish is a workarround. We have an Oracle process which will launch an NT process, which will update PLCs on the shop floor. I need to return success or failure.

    • in reply to: JavaScript1.2 tags, IE VS NS #591264

      Fast response. Thanks.

      I also checked MSDN, Netscape, WebMonkey and one or two others. I could not find it. I will try the load speed theory, by inflating my small file.

      From a coding perspective, it does not make sense to have everything in one file. The menu.js functions may be called by 10 or 20 different scripts. If I include the code from menu.js in each, i have to hunt down every instance if I make a change.

      However, since I cannot control parsing, as you stated, OOP goes down the drain when script files are used.

    • in reply to: Printer turned on? (XL2000) #585156

      I have worked with printers in Access but not Excel, therefore I will point you to an Access resource.

      MS Access 95 Developers Handbook (Sybex), Ch 10 – which I believe (it has been a couple of years, so my memory may be incorrect) was a free chapter on the MS Site. It may have been in the TechNet CD’s, to which we subscribe.

      When I put this together in 1998, I was writting to several of the devices properties and therefore delcared several UDTs, as defined in the book. I would think that if all you want to do is check to see if the printer is on, you could use apiOpenPrinter to check the status. You will need one UDT for this.

      Type tagPrinterDefaults
      pDatatype As String
      pDevMode As Long
      DesiredAccess As Long
      End Type

      The OpenPrinter may only interface with the MS Windows instance of the printer, not the physical printer. In this case, you would have to try writting something to the printer and then check for an error.

      Sorry I cannot give you specifics since so much time has lapsed, but perhaps I have pointed you in the right direction. One thing I found for sure is that working with printers is not easy.

      If you set the printer properties to print directly to the printer, as opposed to spooling, will you get an immediate error message back to your POS system?

    • in reply to: links (Excel 2000) #584786

      “Edit, Links …” Should show the workbooks to which the current workbook links.

    • in reply to: Quick Books (97 SP2) #582447

      Thanks to all for the answers. Looks like all I need to do is find the data model for Quick Books and the rest is a no-brainer.

    • in reply to: Password protect CSV files (Excel2000) #581322

      You could adopt a function like this to encrypt/decrypt data. If you encrypt only the data, not the whole file (I.E. ensure delimiters are still delimiters), you could write a routine to loop through the usedrange after import to decrypt. The routine is not highly secure, but it will stop the average bear.

      Pass in “HelloWorld” to get “aLEEF~F[EM” and pass in “aLEEF~F[EM” to get “HelloWorld”

      ‘Function retreived from http://www.vbcode.com

      Function EncryptPassword(Pwd As Variant) As String
      Dim Temp As String, PwdChr As Integer
      Dim EncryptKey As Integer

      EncryptKey = Int(Sqr(Len(Pwd) * 72)) + 15

      For PwdChr = 1 To Len(Pwd)
      Temp = Temp + Chr(Asc(Mid(Pwd, PwdChr, 1)) Xor EncryptKey)
      Next PwdChr

      EncryptPassword = Temp

      End Function

    • in reply to: Displaying on a userform (Office 2000) #581319

      This was easy in Excel 5. If you can use a worksheet instead of a dialog, you can link the data. However, some controls do not work in a worksheet.

      Try the following and see if it might work for you. Copy a range of cells. Hold the shift key, select Edit, select Paste Picture Link. Now apply the autofilter on the original data. If you are carefull to not copy the top row of data (The titles), the dropdown arrows will not appear in the linked picture.

      Of course you can hide the gridlines, toolbars, row/column headings, scroll bars, etc, if you wish.

    • in reply to: Copy/Paste Autofiltered Data (97) #581314

      I copy and paste autofiltered data all the time. However, only the data which passes the filter test is copied. I am unaware how to copy the filter itself though, asside from copying a whole sheet.

      Also, a single level of summarized data may be copied. I have added the “Select Visible Cells” icon to my toolbar for this purpose.

    • in reply to: OLAP .oqy Updates (2000) #580806

      This works for me, but I am using Oracle. Select “Data, Data Range Properties”, Uncheck “Save Password”, save and close. Open the spreadsheet, refresh data. I am prompted for Username, password and server. In our case, we have 2 identical DB’s as far as structure is concerned. One for production and one for development. As long as I change the server name I am OK.

      Reverse the above process to save the password in the spreadsheet for future use. “Data, Data Range Properties”, Check “Save Password”. In this case there is no need to save and reopen, since you do not care about the password which is cached for the session.

    • in reply to: BeforePrint Event (Win2000/Excel97) #579894

      I suspect the “ActiveSheet” is the culprit. Be sure the macro which is doing the printing activates the sheet.

      Run the macro as is. Put a break point in this routine. In the imediate window type ? ActiveSheet.Name. That is the sheet which recieves the header settings.

    • in reply to: Statistical analysis Excel VS MiniTab (97 SP2) #579891

      I know the data has outliers. We are doing statistical analysis on production cycletimes and the clocks do not stop for break or lunch. I want the Average (mean) of all the data except the outliers. Same with mode, Standard Deviation. I can use an array formula like (CycleTime is named range) {=Average((CycleTime1500,FALSE,CycleTime)))} works.

      If there is a better method, please advise. Thanks.

    • in reply to: ActiveX data Objects, Decimal Type and Oracle (97 SP2) #579627

      Reading the Oracle value into a string works well also, as does testing the variant data type. So now I can get it to work, but I do not understand it. The decimal data type is addressed in Excel’s VBA help, but as is often the case, the information given is virtually useless.

      I was attempting to write a class which I could resuse, but these undocumented suprises may surface again with a new and differnt dataset. The reason I need a class is to overcome the shortfalls of MS Query.

      Thanks for the help.

    • in reply to: ActiveX data Objects, Decimal Type and Oracle (97 SP2) #579626

      Decimal number had no decimal part. In Oracle Number(5) limits the size to 99999. Number (5,2) limits to 99999.99. In this case, the Oracle data type is Number(5).

      As a side issue. Did you used to be on Compuserve or Dephi? I seem to recognize the handle from somewhere.

    Viewing 15 replies - 91 through 105 (of 105 total)