Failure phenomenon: VBA small program, after running macro, sometimes can proceed smoothly, sometimes on the “wind”, 400 errors
Solution: There are a lot of things that could cause 400 errors, but my solution is strange, just activate the worksheet of the action. This object is probably caused by the use of thisWorkBook… This problem can be fixed by using thisWorkbook.sheets (“Sheet1”).activate.
Such as
Set objData = New DataObject
sHTML = Range(“E” & (I)). The Value
sHTML = Replace (sHTML, “& lt; br />” PutInClipboard
ActiveSheet.Paste Destination:=Range(“E” & (i))
Solution: There are a lot of things that could cause 400 errors, but my solution is strange, just activate the worksheet of the action. This object is probably caused by the use of thisWorkBook… This problem can be fixed by using thisWorkbook.sheets (“Sheet1”).activate.
Such as
Set objData = New DataObject
sHTML = Range(“E” & (I)). The Value
sHTML = Replace (sHTML, “& lt; br />” PutInClipboard
ActiveSheet.Paste Destination:=Range(“E” & (i))
As long as to
Set objData = New DataObject
SHTML = Range (” E “& amp; (I)). The Value
sHTML = Replace (sHTML, “& lt; br />” . PutInClipboard
thisworkbook.sheets (“Sheet1”).Activate
activesheet.paste Destination:=Range(“E” & (i))
I’m going to report 400 errors
Read More:
- Excel VBA: cell error value
- VBA error values in Excel
- VBA returns “n / a” and other error information
- excel VBA: Could not complete due to error 800a0011
- VBA “user defined type not defined” MSXML2.DOMDocument
- Configuration problem of pcl1.9.1 under Windows 10 vs2017 (solved)
- Matlab error “Object returned error code of the xlswrite function: 0x800A03EC
- Python error type error: ‘range’ object does not support item assignment, solution
- Origin — draw the curve with error bar
- How to use matlab xlswrite
- [Solved] error: cannot create �� Illegal byte sequence
- How to Use the object of ES6 to clear the object value
- Read multiple sheets of an excel file according to npoi
- TypeError: unsupported operand type(s) for *: ‘range‘ and ‘int‘
- Analysis of jitter using atop and perf
- SSIS Exception: Failed to retrieve long data for column “TS_Description”
- Failed to create Anaconda Menus
- About error:! Package natbib error: Bibliography not compatible with author year citations
- Error building Player because scripts had compiler errors when packaging ab package
- Module in linux driver_ platform_ Learning driver macro