s_row = s_row & c & "|"
Sub SaveAsCSVinQuotes()
Dim r As Range, c As Range, s As String
s = Application.GetSaveAsFilename(, "CSV Files (*.csv),*.csv,All Files (*.*),*.*", , "CSV ? |")
If s = "False" Then Exit Sub
Open s For Output As #1
s = ""
For Each r In ActiveSheet.UsedRange.columns
s_row = ""
For Each c In r.Cells
s_row = s_row & c & "|"
Next
If s = "" Then
s = s_row
Else
s = s & ";" & s_row
End If
Next
Print #1, s
Close #1
End Sub
Sub SaveAsCSVinQuotes()
Dim r As Range, c As Range, s As String
s = Application.GetSaveAsFilename(, "CSV Files (*.csv),*.csv,All Files (*.*),*.*", , "CSV с |")
If s = "False" Then Exit Sub
Open s For Output As #1
s = ""
For Each r In ActiveSheet.UsedRange.Columns
s_row =""
For Each c In r.Cells
s_row = s_row & c & "|"
Next
if s="" then s=s_row else s=s & ";" & s_row end if
Next
Print #1,s
Close #1
End Sub
Sub SaveAsCSVinQuotes()
Dim r As Range, c As Range, s As String
s = Application.GetSaveAsFilename(, "CSV Files (*.csv),*.csv,All Files (*.*),*.*", , "CSV с |")
If s = "False" Then Exit Sub
Open s For Output As #1
For Each r In ActiveSheet.UsedRange.Columns
s = ""
For Each c In r.Cells
s = s & c & "|"
Next
Print #1, s
Next
Close #1
End Sub
Sub SaveAsCSVinQuotes()
Dim r As Range, c As Range, s As String
s = Application.GetSaveAsFilename(, "CSV Files (*.csv),*.csv,All Files (*.*),*.*", , "CSV с |")
If s = "False" Then Exit Sub
Open s For Output As #1
For Each r In ActiveSheet.UsedRange.Rows
s = ""
For Each c In r.Cells
s = s & c & "|"
Next
Print #1, s
Next
Close #1
End Sub
В вашем случае смену формата проще всего сделать через формулы.
На листе Shifts в E3 введите формулу (допустим, в F3):
=time(hour(E3);minute(E3);second(E3))
На листе Shifts fill... - аналогичная формула:
=time(hour(B1);minute(B1);second(B1))
В дальнейшем есть 2 варианта:
1. Копируете из F в E данные через "Специальную вставку - Сохранить только значения" и оставляете как есть, но время вводите внимательно
2. в формулах ссылаетесь на поле F, а не E. Это более удобный вариант
У меня все получилось.
Удачи :-)