LibreOffice 25.2 Help
Defines the error message that is displayed when invalid data is entered in a cell.
ཁྱོད་ཀྱིས་ འཕྲིན་དོན་འཛོལ་བ་དང་གཅིག་ཁར་ མེཀ་རོ་གཅིག་ཡང་འགོ་བཙུགས་ཚུགསཔ་ཨིན། མེཀ་རོ་དཔེ་ཚད་གཅིག་འ་ནི་ཤོག་ལེབ་མཇུག་ལུ་བྱིན་ཡོདཔ་ཨིན།
Displays the error message that you enter in the Contents area when invalid data is entered in a cell. If enabled, the message is displayed to prevent an invalid entry.
གནད་དོན་གཉིས་ཆ་ར་ནང་ ཁྱོད་ཀྱིས་ "Stop" སེལ་འཐུ་འབད་བ་ཅིན་ ཐོ་བཀོད་ནུས་མེད་འདི་བཏོན་གཏང་ནི་ཨིནམ་མ་ཚད་ ཧེ་མ་གི་གནས་གོང་འདི་ཡང་ སླར་བཙུགས་འབད་ཡོདཔ་ཨིན། དེ་བཟུམ་སྦེ་ ཁྱོད་ཀྱིས་ "Warning" དང་ "Information" ཌའི་ལོགསི་ ཆ་མེད་གཏང་ ཨེབ་རྟ་ ཨེབ་གཏང་ཐོག་ལས་ ཁ་བསྡམས་པ་ཅིན་གོང་གི་འཇུག་སྤྱོད་ནང་གཅིགཔ་ཨིན། ཁྱོད་ཀྱིས་ ཌའི་ལོགསི་འདི་ བཏུབ་ ཨེབ་རྟ་དང་བཅསཔ་སྦེ་ཁ་བསྡམས་པ་ཅིན་ ནུས་མེད་ཐོ་བཀོད་འདི་བཏོན་མ་གཏངམ་ཡོདཔ་ཨིན།
ནང་ཐིག་ནང་ལུ་ཚེས་གྲངས་ནུས་མེད་གཅིག་བཙུགས་ཡོད་པའི་སྐབས་ལུ་ ཁྱོད་ཀྱིས་འབྱུང་བཅུག་དགོས་མནོ་མི་བྱ་བ་སེལ་འཐུ་འབད། འ་ནི་ "Stop" བྱ་བ་གིས་ ནུས་མེད་ཐོ་བཀོད་དང་ལེན་སྤང་སྟེ་ ཌའི་ལོག་གཅིག་བཀྲམ་སྟོན་འབདཝ་ཨིནམ་ཁྱོད་ཀྱིས་ བཏུབ་ ཨེབ་གཏང་གི་ཐོག་ལས་ཌའི་ལོག་འདི་ཁ་བསྡམས་དགོསཔ་ཨིན། "Warning" དང་ "Information" བྱ་བ་ཚུ་གིས་ བཏུབ་ ཡང་ན་ ཆ་མེད་གཏང་ ཨེབ་གཏང་ཐོག་ལས་ཁ་བསྡབས་ཚུགས་པའི་ཌའི་ལོག་གཅིག་བཀྲམ་སྟོན་འབདཝ་ཨིན། ཐོ་བཀོད་ནུས་མེད་འདི་ ཁྱོད་ཀྱིས་ ཆ་མེད་གཏང་ ཨེབ་གཏང་ཐོག་ལས་རྐྱངམ་ཅིག་ དང་ལེན་སྤངམ་ཨིན།
ཁྱོད་ཀྱིས་ ནང་ཐིག་ནང་ལུ་ གནད་སྡུད་ནུས་མེད་བཙུགས་ཡོད་པའི་སྐབས་ལུ་ ལག་ལེན་འཐབ་ཡོད་པའི་མེཀ་རོ་ སེལ་འཐུ་འབད་ཚུགས་པའི་ མེཀ་རོ་ཌའི་ལོག་ཁ་ཕྱེཝ་ཨིན། འཕྲིན་དོན་འཛོལ་བ་འདི་བཀྲམ་སྟོན་འབད་ཚར་བའི་ཤུལ་ལུ་ མེཀ་རོ་འདི་ལག་ལེན་འཐབ་ཡོདཔ་ཨིན།
ནང་ཐིག་ནང་ལུ་ གནད་སྡུད་ནུས་མེད་བཙུགས་ཡོད་པའི་སྐབས་ ཁྱོད་ཀྱིས་ བཀྲམ་སྟོན་འབད་དགོས་མནོ་མི་ མེཀ་རོ་གི་མགོ་མིང་ ཡང་ན་ འཕྲིན་དོན་འཛོལ་བ་བཙུགས།
ནང་ཐིག་ནང་ལུ་གནད་སྡུད་ནུས་མེད་བཙུགས་ཡོདཔ་ད་ ཁྱོད་ཀྱིས་ བཀྲམ་སྟོན་འབད་དགོས་མནོ་མི་ འཕྲིན་དོན་བཙུགས།
Below is a sample function that can be called when an error occurs. Note that the macro takes in two parameters that are passed on by LibreOffice when the function is called:
CellValue: The value entered by the user, as a String.
CellAddress: The address of the cell where the value was entered, as a String prefixed with the sheet name (e.g: "Sheet1.A1").
The function must return a Boolean value. If it returns True, the entered value is kept. If the function returns False, the entered value is erased and the previous value is restored.
Function ExampleValidity(CellValue as String, CellAddress as String) as Boolean
Dim msg as String
Dim iAnswer as Integer
Dim MB_FLAGS as Integer
msg = "Invalid value: " & "'" & CellValue & "'"
msg = msg & " in cell: " & "'" & CellAddress & "'"
msg = msg & Chr(10) & "Accept anyway?"
MB_FLAGS = MB_YESNO + MB_ICONEXCLAMATION + MB_DEFBUTTON2
iAnswer = MsgBox (msg , MB_FLAGS, "Error message")
ExampleValidity = (iAnswer = IDYES)
End Function