Thread View: comp.apps.spreadsheets
3 messages
3 total messages
Started by Siva Misra
Thu, 19 Nov 1992 04:30
Help on WINGZ
Author: Siva Misra
Date: Thu, 19 Nov 1992 04:30
Date: Thu, 19 Nov 1992 04:30
13 lines
1017 bytes
1017 bytes
Hello all, Can somebody answer answer my question on using the WINGZ hyperscript please. The question is : Does WINGZ HyperScript allows me to check if a work sheet is currently open. Because everytime I try to do open operation on already opened worksheet, WINGZ displays a message "File already open". Well you might say that why should you open again and again. But in my script some times I close, as I have many work sheets to operate on. Thanks for any leads. Cheers! Misra siva@faceng.anu.edu.au
Re: Help on WINGZ
Author: Keith Thorne
Date: Thu, 19 Nov 1992 16:45
Date: Thu, 19 Nov 1992 16:45
81 lines
2614 bytes
2614 bytes
Hi,
I write lots of code in hyper script so if you need other info, keep my
name around.
Below is a funciton which checks to see if a sheet is open, if not then
open it, if it is open, then bring it to the front. Here it is...
{**************************************}
Function GET_APP_EDIT()
DEFINE master_sheet, support_path
UNSELECT
master_sheet = name()
support_path = sys_path
SELECT RANGE APP_SPEC
SELECT MORE RANGE TRAFFIC_DATA
COPY
{ opwn the application edit sheet }
GO TO WINDOW sys_path & ":APP_EDIT.WGZ"
IF (kt_utils:sheet_name() <> "APP_EDIT.WGZ")
OPEN sys_path & ":APP_EDIT.WGZ"
END IF
INVALIDATE ON
PUT master_sheet INTO A50
PUT support_path INTO A51
{SELECT RANGE APP_SPEC}
SELECT RANGE C11
PASTE
UNSELECT
INVALIDATE OFF
REPAINT SELECTIONS ON
END FUNCTION
{**************************************}
sys_path: this is the is a cell in the parent sheet containing the path to
other support files. In my case, the sheet I am going to open is in the
directory contained in the cell named sys_path.
This function copies data from the parent sheet, which is locked, to a
work
sheet for editing. The new, temporary sheet is called APP_EDIT.WGZ and it
will be found in the directory indicated by sys_path.
The code you ask for occurs after the comment { opwn the application edit
sheet }. The funciton kt_utils:sheet_name is a utility function I wrote
allso, included below.
The GO TO WINDOW command will activate the indicated sheet if it is open.
The if statement checks to see if the active window matches the one you
wanted to activate, if the names do not match then the sheet must not have
been open and I make the open call.
If you have any questions, just drop a line. Here is the other
function...
{**************************************}
function SHEET_NAME() { Name of current sheet without path }
define name,col
name = name()
col = match(name,":",2)
while col > 0
name = mid(name,col,length(name) - col)
col = match(name,":",2) {start searching at second char for colon}
end while
return (name)
end function
Re: Help on WINGZ hyperscript and charts
Author: Keith Thorne
Date: Thu, 19 Nov 1992 16:50
Date: Thu, 19 Nov 1992 16:50
13 lines
1031 bytes
1031 bytes
I'm trying to create a chart give it a name and each time the user request a new chart, erase the old chart. I know how to erase the old chart, just select it by name and clear. But, the first time the users attemts this with new data, there is no chart, and the nasty message "Selection was unsuccessfull" comes up. I could use On Error, but I don't want other errors traped. Is there some way to check to see if an object is there before you attempt to select it? Or some other way to prevent this error message from appearing. Thanks. - Keith
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads