CodePudding user response:
Add reference to excel, and then refer to the following code:Private Sub Command1_Click ()
Dim mExcel As Excel. Application
The Set mExcel=GetObject (, "excel. Application")
MExcel. ActiveCell. Value="https://bbs.csdn.net/topics/sfsiof"
The Set mExcel=Nothing
End Sub
CodePudding user response:
GetObject, if an error, use CreateObject create a,