• H. Legare Coleman

    H. Legare Coleman

    @legarecolemanusa-net

    Viewing 15 replies - 7,006 through 7,020 (of 7,026 total)
    Author
    Replies
    • in reply to: &gt #511552

      It can be a lot of things. In mathematics, it is a greater than sign and is used in logic and boolean algebra to indicate the relationship between two values. In English, it is another form of parenthesis and can be used like (), {}, or []. In email, it is normally used to indicate that the texte between it and a usually accompanying “<" or the end of the current line was copied from the email being replied to. Have you seen it in some other context, there are probably other meanings.

    • in reply to: Multiprogram Launch from a Single Icon #1776839

      I haven’t tried this, but it should work. Have the Icon launch a DOS batch file that uses the START command without the /Wait switch to launch the programs.

    • in reply to: Need help formatting cell #1776715

      If you are not using Excel 2000 (and therefore don’t have the Data Validation feature), or if Data Validation won’t work for some other reason, then you can use the worksheet change or selection change events and write VBA code to limit the data entry to whatever you want. That code is pretty tricky to write, so Data Validation would be much easier if it will work.

    • in reply to: Check if a sheet exists & if so, delete it #1776574

      I would do something like this:

      Dim wsOS As Worksheet
      
          On Error Resume Next
          Set wsOS = Worksheets("OurSheet")
          On Error GoTo 0
          If Not wsOS Is Nothing Then
              Application.DisplayAlerts = False
              wsOS.Delete
              Application.DisplayAlerts = True
          End If
          wsOS = Nothing
      
    • in reply to: Office 2000 registration Wizard #511248

      If you give in, then why will Microsoft ever get rid of this monstrosity? I will never buy a product that contains the Registation Wizzard.

    • in reply to: Office 2000 registration Wizard #511246

      You are exactly right, I am paying to use the software and the registration wizard prevents me from using it. This is Microsoft’s attempt to return to the horrible old days of copy protection. It didn’t work then and I hope it doesn’t work any better for Microsoft. Lotus, Ashton Tate, and other companies long forgotten tried to keep copy protection in the face of customer dislike and look where they are. Will Microsoft do the same?

    • in reply to: Arrays #1776376

      Ok, the code below will find the combination of 12 cells in the range A1:A21 that adds up to the sum passed as a parameter to the subroutine. First, a couple of warnings. The procedure is written to expect to find an exact match on the sum and therefore is only guaranted to work on integer values. If the cells can contain real numbers, the procedure will have to be modified to deal with the rounging errors. Second, be patient. This procedure can run for a long time. To find the sum where the values were in the last 12 cells took over 5 minutes on the 400mz system I tested it on.

      Public Sub Find12(dReqTot As Double)
      Dim I1 As Integer, I2 As Integer, I3 As Integer, I4 As Integer, I5 As Integer, I6 As Integer
      Dim I7 As Integer, I8 As Integer, I9 As Integer, I10 As Integer, I11 As Integer, I12 As Integer
      Dim dSum As Double, dList(1 To 12) As Double
      Dim strWk As String
      For I1 = 1 To 10
        For I2 = I1 + 1 To 11
          For I3 = I2 + 1 To 12
            For I4 = I3 + 1 To 13
              For I5 = I4 + 1 To 14
                For I6 = I5 + 1 To 15
                  For I7 = I6 + 1 To 16
                    For I8 = I7 + 1 To 17
                      For I9 = I8 + 1 To 18
                        For I10 = I9 + 1 To 19
                          For I11 = I10 + 1 To 20
                            For I12 = I11 + 1 To 21
                              dSum = Cells(I1, 1) + Cells(I2, 1) + Cells(I3, 1)
                              dSum = dSum + Cells(I4, 1) + Cells(I5, 1) + Cells(I6, 1)
                              dSum = dSum + Cells(I7, 1) + Cells(I8, 1) + Cells(I9, 1)
                              dSum = dSum + Cells(I10, 1) + Cells(I11, 1) + Cells(I12, 1)
                              If dSum = dReqTot Then Exit For
                            Next I12
                            If dSum = dReqTot Then Exit For
                          Next I11
                          If dSum = dReqTot Then Exit For
                        Next I10
                        If dSum = dReqTot Then Exit For
                      Next I9
                      If dSum = dReqTot Then Exit For
                    Next I8
                    If dSum = dReqTot Then Exit For
                  Next I7
                  If dSum = dReqTot Then Exit For
                Next I6
                If dSum = dReqTot Then Exit For
              Next I5
              If dSum = dReqTot Then Exit For
            Next I4
            If dSum = dReqTot Then Exit For
          Next I3
          If dSum = dReqTot Then Exit For
        Next I2
        If dSum = dReqTot Then Exit For
      Next I1
      If dSum = dReqTot Then
        strWk = Cells(I1, 1) & "+" & Cells(I2, 1) & "+" & Cells(I3, 1) & "+"
        strWk = strWk & Cells(I4, 1) & "+" & Cells(I5, 1) & "+" & Cells(I6, 1) & "+"
        strWk = strWk & Cells(I7, 1) & "+" & Cells(I8, 1) & "+" & Cells(I9, 1) & "+"
        strWk = strWk & Cells(I10, 1) & "+" & Cells(I11, 1) & "+" & Cells(I12, 1) & "=" & dReqTot
        MsgBox strWk
      Else
        MsgBox "No combination adds up to " & dReqTot
      End If
      End Sub
      
    • in reply to: formating columns – HELP!!!!! #1776365

      From your description of what you are doing, nothing is goofy, it is working exactly as it should be working. The date format is the DISPLAY format and has nothing to do with interpreting what you type into a cell, it only determines how what is in a cell is displayed. When you enter something like 11801 into a cell, Excell does not have any way of knowing that you mean this to be a date. It will put that number into the cell. If the cell is formatted as a date, then Excel will display a date that is 11,801 days from 1/1/1900 which is not 1/18/2001. When entering a date into a cell, you must type in the separator ncharacters. If you want it to work the way you described, it can be done by writing a Change event macro that will take what you type and insert the separators.

    • in reply to: Random Number Generator #1776363

      A formula like the following will generate a random number between DE and ABC:

      =DE+(ABC-DE)*Rand()

      You can copy that formula to as many cells as you need to get the number of values you need. You may also need to use the Round function to round the values to the number of digits you need. If you don’t want the values to change every time the sheet recalculates, then copy the range and do a paste special values.

    • in reply to: formating columns – HELP!!!!! #1776283

      There are a number of possibilities. First, to “Options” in the “Tool” menu. In the dialog box that results click on the “Transition” tab. At the bottom of that display see if you have either “Transition formula evaluation” or “Transition entry” selected. If you do, deselect them and try the entry again. Either of those options can cause this symptom.

      If that is not it, then we need a little more information. Format the cells containing the date to display a 4 digit year (“mm/dd/yyyy”) and tell us what that year really is. It is 0023, 1923, 2023, etc.?

    • in reply to: Arrays #1776280

      We need a little more information:

      1- Does it have to be 12 consecutive values, or should it be any combination of the 21 cells?

      2- Can a particular cell be used more that once?

      3- What result do you want and how do you want it. Surly you don’t want the sum since you know that going in. Do you want a list of the indexes of the cells used? Do you want a list of the values used? In an array?

      I assume you are talking about doing this in VBA.

    • in reply to: Template number #1776254

      There are several ways to do this, and all of the ones I know about require a macro (VBA procedure). The macro would be tied to the Application.Newworkbook event. The macro would generate the invoice number and place it in the appropriate cell. How you generate this number depends on what you want the number to look like, and if the template is being used on more than one PC to generate invoices. If you want a sequential number, and the template is only used by one person, then you can keep the current invoice number in the Registry or in a file on the hard disk. When the Newworkbook event fires, the macro would retrieve the current number, add one to it, put the new invoice number in the appropriate cell, and write the new current number back to the Registry of the file. If the template is used on more than one PC and you want to insure unique sequential numbers, then the current number will have to be kept in a file shared on a file server by all of the PCs using the template. Another method would be to generate a invoice number from the date and time.

    • in reply to: Need help with .bat file #510859

      One thing that you can do is to replace the DELTREE command with the following command:

      ECHO Y|DEL C:WINDOWSTEMP*.*

      This will delete the contents of the temp directory without deleting the directory itself. Unfortunately, this has one negative side affect, it will not delete any subdirectories that were created in the temp directory. This could leave a lot of junk lying around.

      A second thing that you can do is to create a new temp directory after it is deleted bay adding this command after the DELTREE command:

      MD C:WINDOWSTEMP

      There is also one negative to this approach if the batch file is run while there are any files in the temp directory that are open. If there are files in the temp directory that are open when the batch file us run, then DELTREE will not be able to delete those files, and therefore will not be able to delete the directory. That means that you will get several error messages when the batch file runs. If you don’t mind seeing those messages, then there is no harm done. However, there is one other possibility that might cause you a problem with this approach. If DELTREE is able to delete the directory, and if a Windows program attempts to create a new file in the temp directory before it gets recreated, that will fail. What will happen then depends on how the program trying to create the file is programmed to handle the error. This is not very likely, but it could happen.

    • in reply to: Office Toolbar #510854

      You can put a button on the Office Shortcut Bar to print a document, however, that button will always print the same document and I don’t think that is what you had in mind.

      There is a better solution for printing documents from the desktop from applications that support it. First, open your Printers folder and select a printer that you want to be able to use to do this. Right click on that printer and drag it to your desk top. Release the right button and click on “Create Shortcut” in the pop up menu. This should create a shortcut for the printer on your desktop. Do this for all printers that you want to be able to use to do this. Now, when you want to print a document, just drag its icon from your desktop or from Windows Explorer and drop it on the printer icon on the desktop. Windows will open and print the document. I think that all of the Microsoft applications support this.

    • in reply to: Formatted value of anExcell cell #1776159

      What do you want to do with it? You can copy the cell and paste it with formatting into another cell. I haven’t tried it, but I think you can get the cell value and the cell number format and use them in a Text function.

    Viewing 15 replies - 7,006 through 7,020 (of 7,026 total)