FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Excel macro conversion
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Excel macro conversion
Posted: Mon Apr 11, 2022 01:52 PM
Hi,

I want to create a macro from FW in excel.

I found this sample in VB
Code (fw): Select all Collapse
*Dim vbp As Object
Dim newmod As Object
Set vbp = ActiveWorkbook.VBProject
Set newmod = vbp.VBComponents.Add(1)


I try to convert in into FWH but have a problem already with the first line. I always get an error with VBProject

Code (fw): Select all Collapse
oExcel = CREATEOBJECT( "Excel.Application" )
oWorkbook = oExcel:WorkBooks:Add()
vbp = oExcel:ActiveWorkbook:VBProject
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite

Continue the discussion