Mastakilla
Programmer
Hi,
i know how to create a new excel sheet in a workbook,
for example this code works fine:
(i allready have a workbook)
But what i want is to use a function that returns a workSheet which i would like to be able to add to my workbook:
imagine i have a function:
I want to use it like this:
i know it's not the right property for this action, but is there any at all that lets me do that??
I hope i was clear enough,
many thanks in advance
i know how to create a new excel sheet in a workbook,
for example this code works fine:
(i allready have a workbook)
Code:
dim myNewSheet = workbook.worksheets.add
But what i want is to use a function that returns a workSheet which i would like to be able to add to my workbook:
imagine i have a function:
Code:
public function getSheet() as excel.worksheet
'process
getsheet = someExistingWorkSheet
end function
I want to use it like this:
Code:
myWorkBook.worksheets.add (getSheet())
i know it's not the right property for this action, but is there any at all that lets me do that??
I hope i was clear enough,
many thanks in advance