I'm getting a error saying
Error Code 70: Permission Denied
Debugger throws up the error in the line of Print #intfhbig, stroutbig
Also, this error error is peculiar to me as it was running alright until i was using office2007, recently i migrated to office365 to take some advantages of the newly available formulas and 64bit.., in the beginning, code seem to be working fine but in the continuous run, it throws up an error popup box, interrupting the work, say like five times in an hour. Could somebody help me in this regard, Below is the code, please check. Thank you.
Error Code 70: Permission Denied
Debugger throws up the error in the line of Print #intfhbig, stroutbig
Also, this error error is peculiar to me as it was running alright until i was using office2007, recently i migrated to office365 to take some advantages of the newly available formulas and 64bit.., in the beginning, code seem to be working fine but in the continuous run, it throws up an error popup box, interrupting the work, say like five times in an hour. Could somebody help me in this regard, Below is the code, please check. Thank you.
Code:
Option Explicit
Dim runtimerbig As Date
Public Sub bigtoNotepad()
Const timerAmount2019 As String = "00:01:00"
runtimerbig = Now + TimeValue(timerAmount2019)
Application.ScreenUpdating = False
Application.OnTime runtimerbig, "bigtoNotepad"
Dim sfilenamebig As String
Dim intfhbig As Integer
Dim ocellbig As Range
sfilenamebig = "D:\bigcollection.txt"
Close
intfhbig = FreeFile()
Open sfilenamebig For Output As intfhbig
Dim stroutbig As String
For Each ocellbig In Worksheets("NotepadData").Range("A1:A621")
stroutbig = Join(Application.Transpose(Application.Transpose(ocellbig.Resize(1, 10).Value)), vbTab)
Print #intfhbig, stroutbig
Next ocellbig
Close intfhbig
Application.ScreenUpdating = True
End Sub