summaryrefslogtreecommitdiffstats
path: root/helpcontent2/source/text/sbasic/shared/03140011.xhp
diff options
context:
space:
mode:
Diffstat (limited to 'helpcontent2/source/text/sbasic/shared/03140011.xhp')
-rw-r--r--helpcontent2/source/text/sbasic/shared/03140011.xhp72
1 files changed, 72 insertions, 0 deletions
diff --git a/helpcontent2/source/text/sbasic/shared/03140011.xhp b/helpcontent2/source/text/sbasic/shared/03140011.xhp
new file mode 100644
index 000000000..6864384ba
--- /dev/null
+++ b/helpcontent2/source/text/sbasic/shared/03140011.xhp
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<helpdocument version="1.0">
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+
+<meta>
+ <topic id="textsbasicshared03140011xml" indexer="include" status="PUBLISH">
+ <title id="tit" xml-lang="en-US">SLN Function [VBA]</title>
+ <filename>/text/sbasic/shared/03140011.xhp</filename>
+ </topic>
+</meta>
+
+<body>
+
+
+<section id="sln">
+<bookmark xml-lang="en-US" branch="index" id="bm_id3150499">
+ <bookmark_value>SLN function</bookmark_value>
+</bookmark>
+
+
+<paragraph id="hd_id3150499" role="heading" level="1" xml-lang="en-US"><link href="text/sbasic/shared/03140011.xhp" name="SLN Function [VBA]">SLN Function [VBA]</link></paragraph>
+<paragraph id="par_id3151384" role="paragraph" xml-lang="en-US">Returns the straight-line depreciation of an asset for one period. The amount of the depreciation is constant during the depreciation period.</paragraph>
+</section>
+<embed href="text/sbasic/shared/00000003.xhp#vbasupport"/>
+<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+<bascode>
+<paragraph id="par_id3143267" role="bascode" localize="false" xml-lang="en-US">SLN (Cost as Double, Salvage as Double, Life as Double)</paragraph>
+</bascode>
+<embed href="text/sbasic/shared/00000003.xhp#functvalue"/>
+<paragraph id="par_id3150669" role="paragraph" localize="false" xml-lang="en-US">Double</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+<paragraph id="par_id240720170117391741" role="paragraph" xml-lang="en-US"><emph>Cost</emph> is the initial cost of an asset.</paragraph>
+<paragraph id="par_id24072017011739895" role="paragraph" xml-lang="en-US"><emph>Salvage</emph> is the value of an asset at the end of the depreciation.</paragraph>
+<paragraph id="par_id240720170117395610" role="paragraph" xml-lang="en-US"><emph>Life </emph>is the depreciation period determining the number of periods in the depreciation of the asset.</paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
+<embed href="text/sbasic/shared/00000003.xhp#err5"/>
+<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+<bascode>
+<paragraph id="par_id24072017011739179" role="bascode" localize="false" xml-lang="en-US">REM ***** BASIC *****</paragraph>
+<paragraph id="par_id240720170117398470" role="bascode" localize="false" xml-lang="en-US">Option VBASupport 1</paragraph>
+<paragraph id="par_id240720170117391109" role="bascode" localize="false" xml-lang="en-US">Sub ExampleSLN</paragraph>
+<paragraph id="par_id24072017011739366" role="bascode" xml-lang="en-US">REM Calculate the yearly depreciation of an asset that cost $10,000 at</paragraph>
+<paragraph id="par_id240720170117398814" role="bascode" xml-lang="en-US">REM the start of year 1, and has a salvage value of $1,000 after 5 years.</paragraph>
+<paragraph id="par_id240720170117393993" role="bascode" localize="false" xml-lang="en-US">Dim y_dep As Double</paragraph>
+<paragraph id="par_id240720170117395151" role="bascode" localize="false" xml-lang="en-US">y_dep = SLN( 10000, 1000, 6 )</paragraph>
+<paragraph id="par_id240720170117391728" role="bascode" xml-lang="en-US">print y_dep ' returns 1500.</paragraph>
+<paragraph id="par_id240720170117394409" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph>
+</bascode>
+
+<section id="relatedtopics">
+<paragraph id="par_id061420170153186192" role="paragraph" xml-lang="en-US"><link href="text/scalc/01/04060119.xhp#bm_id3148912">SLN function in CALC</link></paragraph>
+<embed href="text/sbasic/shared/00000003.xhp#VBA-Financial"/>
+</section>
+</body>
+
+</helpdocument>