The following VBA code has difficulty copying the row to NotePad. It is very slow and…
Jump to turn (7)
- 1The following VBA code has difficulty copying the row to NotePad. It is very slo
- 2Wow! The VBA was super fast and just what I wanted. Is there a way of adding an
- 3What happens to the RowData.txt after I close it
- 4How then can I incorporate a cleanup routine in the VBA code to delete it automa
- 5The last vba that deleted the temp file did not work as expected. Using the orig
- 6It appears that the new code still creates a temp file
- 7Instead of using the Desktop can you use this filepath: filePath = ThisWorkbook.
- User
The following VBA code has difficulty copying the row to NotePad. It is very slow and sometimes, does not complete due to heavy rescource use. Is there a way of achieving the same result with a completely different approach.
Sub RowToNote() ' Unlock Sheet 'Me.Unprotect Password:="edit" Application.EnableEvents = False Application.ScreenUpdating = False 'Application.CutCopyMode = False Dim rng1 As Range Dim rowNum As Integer Dim cell As Range rowNum = ActiveCell.row 'Set rng1 = Range("A" & rowNum & ":J" & rowNum) Set rng1 = Range("C" & rowNum & ":L" & rowNum) rng1.Copy Shell "notepad.exe", vbNormalFocus Application.Wait Now + TimeValue("00:00:01") For Each cell In rng1 SendKeys cell.Value SendKeys vbCrLf Next cell ' Lock Sheet 'Me.Protect Password:="edit" 'Application.CutCopyMode = False Application.ScreenUpdating = True Application.EnableEvents = True doubleClickFlag = False preventTrigger = False End Sub
- Assistant