Welcome to KORG!

There is a set of dedicated UDFs for manipulating Excel objects that should make things easier. The large library is called "XlLib". The functions include
 Code:
;;	xlInit()		Create the Excel object reference
;;	xlQuit()		Destroy the instantiated object & shut down Excel
;;	xlFile()		Open, Save, or SaveAs file functions
;;	xlBookCreate()		Create a new workbook in the active object
;;	xlBookProperties()	Read / Set the workbook properties
;;
;;	xlSheetAdd()		Create a new worksheet, define properties
;;	xlSheetName()		Read / Set the active worksheet name
;;	xlSheetSelect()		Set the active worksheet by name or index #
;;	xlSheetDelete()		Delete the specified sheet
;;	xlSheetPrint()		Prints the specified sheet
;;	xlSheetCount()	   (EK)	Returns the number of sheets in the workbook
;;
;;	xlRangeValue()		Read / Write a worksheet cell or range
;;	xlRangeClear()		Clear the specified worksheet range
;;	xlRangeDelete()		Delete the specified worksheet range
;;	xlRangeFormat()		Read / Set style formatting attributes on a cell range
;;	xlRangeFormatNum() (EK)	Read / Set number formatting attributes on a cell range
;;	xlRangeFreeze()		Set / Unset display pane freezing at a specific cell
;;	xlRangePrint()		Prints the specified worksheet range
;;	xlRangeSearch()	   (EK)	Searches a range for a value
;;	xlRangeSort()	   (EK)	Sorts the specified range
;;
;;	xlPageSetup()		Read / Set global format and printing options
;;	xlWindow()		Read / Set the Excel application window visibility status
;;
;; The following are utility functions to aid in the manipulation of Excel settings
;;	xlCol()			Translate between alpha and numeric column IDs
;;	xlColRow()		Splits a cell reference (A1) into component reference parts (A, 1)
;;	xlColor()		Translates between color names and index values
;;
;; The functions marked "(EK)" were originally developed by Erik Kaerholm and adapted
;; to this library by Glenn Barnas. Erik's original library can be found at
;; http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=86576
You want to look at "xlSheetSelect()" in particular. They are posted here in the UDF forum, and maintained in the resources / Kix UDF Lib on my web site.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D