Hi There
I have a Macro that copies data into Notepad but I cannot get the TABs to be replaced with a pipr (|). I am using the following code:
'Copy
Sheets("Sheet2").Select
ActiveSheet.Range("A4:d104").Copy
'Run Notepad
Shell "notepad.exe", vbMaximizedFocus
THour = Hour(Now())
TMinute = Minute(Now())
TSecond = Second(Now()) + 3
waitTime = TimeSerial(THour, TMinute, TSecond)
Application.Wait waitTime
'Paste
Application.SendKeys "(^V)"
Selection.Replace What:="009", Replacement:="|", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Sheets("Sheet1").Select
Range("A4").Select
End Sub
009 being used for TAB
Any help would be much appreciated.
I have a Macro that copies data into Notepad but I cannot get the TABs to be replaced with a pipr (|). I am using the following code:
'Copy
Sheets("Sheet2").Select
ActiveSheet.Range("A4:d104").Copy
'Run Notepad
Shell "notepad.exe", vbMaximizedFocus
THour = Hour(Now())
TMinute = Minute(Now())
TSecond = Second(Now()) + 3
waitTime = TimeSerial(THour, TMinute, TSecond)
Application.Wait waitTime
'Paste
Application.SendKeys "(^V)"
Selection.Replace What:="009", Replacement:="|", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Sheets("Sheet1").Select
Range("A4").Select
End Sub
009 being used for TAB
Any help would be much appreciated.