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
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...
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.
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...
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
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#)
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
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...
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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.