1. André Rust
  2. PowerBuilder
  3. Monday, 10 July 2023 08:33 AM UTC

Hi,

how can I do thies.

I create an Excel sheet from Powerbuilder and want to allow the range (e.g. Range("A5:L37") with "AllownEditRange") as input.
The sheet is protected with "Protect".

Here is my code:
-- I can't found any sample for this
iole_sheet.protection.alloweditranges.Add Title:="Date Input", Range:= Range("A5:L37")

-- I hope this code is correct, it works
iole_sheet.protect( 'PW', TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE )

Pls help. Thx.
André

André Rust Accepted Answer Pending Moderation
  1. Monday, 10 July 2023 09:34 AM UTC
  2. PowerBuilder
  3. # 1

Hi

I have found the correct code

-- Editable Range for this sheet
ole_sheet.protection.alloweditranges.add( ( 'Edit Range' ), ole_sheet.range( 'M' + string( il_begin_title_daten + 1 ), 'N'+ string( il_summen_zeile ) ) )

 

-- Protect sheet
ole_sheet.protect( 'PW', TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE )

 

I hope other can use this. CU

André

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.