Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: nnett
  • Order by date
  1. nnett

    VBA overwrite csv file if it was created today, else create a new one

    I have used the following code for somthing similar Application.DisplayAlerts = False FileStamp = FileDateTime("\\XXXX\XXXX\XXXX\XXXXX.CSV") FileDate = Mid(FileStamp, 1, 10) TodayDate = Mid(Date, 1, 10) If FileDate = TodayDate Then ~code to save file~ end if Application.DisplayAlerts = True
  2. nnett

    Change BackColor of CellRange where Focus Resides

    I think what you are after is: Public old_row As String Private Sub Worksheet_SelectionChange(ByVal Target As Range) If old_row <> "" Then ActiveSheet.Range(Cells(old_row, 3), Cells(old_row, 5)).Interior.ColorIndex = xlNone old_row = ActiveCell.Row...
  3. nnett

    Populating ComboBox in Word 2007

    The Problem I had was that on some machines the library needed to be included as well as the class. So "combobox.additem" caused an error but "MSForms.combobox.additem" was OK.
  4. nnett

    Populating ComboBox in Word 2007

    I have had a similar problem (not with office 2007) that adding MSForms.CombBox...etc fixed.
  5. nnett

    Excel VBA Dialog Box

    note should be in the above UNITS = "METRIC
  6. nnett

    Excel VBA Dialog Box

    The following should work if, UNITS was only used to set the cell values then the public declare can be removed as well as the setting of the value in the command button code Public UNITS As String Sub Data_Change() Load frmUNITS frmUNITS.Show End Sub frmUNITS Private Sub...
  7. nnett

    Remember where I came from?

    Sourcesheet needs to be a public variable set at the end of you button click on the original sheet, you can then retun to to your original sheet with "Sheets(SourceSheet).Select
  8. nnett

    Converting UNIX date in Word

    I think the Unix time will be the number of seconds since 1970 but I could be wrong? so the DateAdd function is what you are looking for. eg dostime = DateAdd("s", unix_time, #1/1/1970#)
  9. nnett

    Dynamic File Naming In Excel

    Hi, If you add "newWB.Worksheets.Add" between the two lines renaming the worksheets your code should work, you may need to change the second line to "newWB.Worksheets.Item(1).name = ("Summary With Line")" as the new sheet will become item 1 Hope this helps
  10. nnett

    data from a cell (string)

    Hi robcarr If the format is fixed, the following will give the same results as above, the code uses the InStr function to find the first “)” the “,” and the space after the first name. Dim WholeString As String Dim FirstClose As Integer Dim FirstComma As Integer Dim...
  11. nnett

    set combo box to non-editable in MS Outlook form

    Hi lywong111 You need to set the Combobox MatchRequired property to True. Hope this helps Steve
  12. nnett

    Subtotals by Group

    If your data is already sorted in branch order this should do what you want. Range("A1").Select Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select Selection.Subtotal GroupBy:=1, Function:=xlSum, _ TotalList:=Array(3), Replace:=True, PageBreaks:=False, _ SummaryBelowData:=True

Part and Inventory Search

Back
Top