I am trying to access the VBA method 'RGB' via Ruby:
The problem is this method belongs to the 'VBA' library not the 'Excel' library. To connect to the Excel library I would do something like this:
require 'win32ole'
xl = WIN32OLE.new('Excel.Application') # => opens Excel
xl.visible = true # => show it
@wb = xl.Workbooks.open(excel_file) # => adds a workbook
@ws = @wb.Worksheets(sheet) # => open specific sheet
But I do not know how to connect to the VBA library. I've tried:
require 'win32ole'
vba = WIN32OLE.new('VBA.Application')
vba = WIN32OLE.new('VBA')
Even better would be if I could somehow programmatically generate a list of all OLE libraries on my computer.