11/26/2024 8:21:51 PM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
|
|
|
|
Excel application object - Avoid any errors
Posted: 24 Oct 06 5:29 AM
|
fiogf49gjkf0d Basically I'm constructing an excel application object but I want it to avoid any error conflicts if excel is not installed on the pc the script will be ran on. I could check to see if the excel executable exists and go about it that way but is there a more reliable way of going about this? |
|
|
| |
|
Re: Excel application object - Avoid any errors
Posted: 25 Oct 06 7:41 AM
|
fiogf49gjkf0d To expand on Phil's comment, here is some code I reused from something similar I found in the SLX source:
sub CallExportExcel() if IsExcelInstalled then FixCol grdForecast.Columns, True ExportGridToExcel grdForecast, "Forecast" FixCol grdForecast.Columns, False else Msgbox "Error: Excel is not installed." end if end sub
function IsExcelInstalled dim objExcel
on error resume next set objExcel = CreateObject("Excel.Application") If (err.number <> 0) Then err.clear IsExcelInstalled = False Else IsExcelInstalled = True End If
set objExcel = Nothing
on error goto 0 end function
|
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|