matteoluigi Posted October 2, 2020 Share Posted October 2, 2020 (edited) Is it really necessary, to create a new worksheet, everytime I run the script again? a) or can I "assign the worksheet to the handle in another way, too? (still looking for the way) b) is there any way, to check, wether a worksheet of a specific name already exists in the file? worksheet := CreateWS('Wohnungstypen-Auto', 5, 2); SetWSCellFormulaN(worksheet, zeile, 1, zeile, 1, inString); Edited October 2, 2020 by matteoluigi Quote Link to comment
MullinRJ Posted October 2, 2020 Share Posted October 2, 2020 Hi @matteoluigi , You can get the handle to any named object using GetObject() like this: H := GetObject('Wohnungstypen-Auto'); if (H <> nil) & (GetTypeN(H) = 18) then begin { type 18 = Worksheet } { do worksheet stuff here } end; { if } It is always wise to check a handle's validity and type before using it. HTH, Raymond 2 Quote Link to comment
Pat Stanford Posted October 2, 2020 Share Posted October 2, 2020 Worksheets are just like any other VW object and can be accessed a number of different ways. As Raymond says, Naming the worksheet might be the easiest way. But you could also use criteria to get a handle to the Worksheet Image on the drawing and then use that to get the handle to the actual worksheet so you can edit it. 1 Quote Link to comment
matteoluigi Posted October 3, 2020 Author Share Posted October 3, 2020 Great, thanks Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.