<?xml version="1.0" encoding="iso-8859-1" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Dansk Regneark Forum : MsgBox hvis</title>
  <link>https://forum.excel-regneark.dk/</link>
  <description><![CDATA[Dette er et XML Feed af; Dansk Regneark Forum : Makro og VBA : MsgBox hvis]]></description>
  <pubDate>Sat, 05 Dec 2026 21:52:05 +0000</pubDate>
  <lastBuildDate>Thu, 17 Dec 2015 16:10:17 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.08</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://forum.excel-regneark.dk/RSS_post_feed.asp?TID=2344</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Dansk Regneark Forum]]></title>
   <url>https://forum.excel-regneark.dk/css_styles/Excel-regneark.dk/logo.png</url>
   <link>https://forum.excel-regneark.dk/</link>
  </image>
  <item>
   <title><![CDATA[MsgBox hvis : Hej, Det virker desv&#230;rre ikke...]]></title>
   <link>https://forum.excel-regneark.dk/msgbox-hvis_topic2344_post11007.html#11007</link>
   <description>
    <![CDATA[<strong>Forfatter:</strong> <a href="https://forum.excel-regneark.dk/member_profile.asp?PF=873">Mikkel</a><br /><strong>Emne:</strong> 2344<br /><strong>Sendt:</strong> 17.Dec.2015 kl. 16:10<br /><br />Hej, <br><br>Det virker desværre ikke som det skal.<br><br>Er der en venlig sjæl, som kan se hvad der er galt, med koden herunder, der er lavet lidt om på det så det er nemmere at rette i "beskederne" til brugeren, men det ser ikke ud til at virke desværre.<br><br><pre ="bbcode_code" style="height:540px;">Private Sub Worksheet_Change(ByVal Target As Range)     Dim feedback As String     Const msg As String = "You have chosen - "     Const msg_Guaranteed As String = "your total ammount of hours are not to exceed the guranteed hour"     Const msg1 As String = "When working Offshore you are only entitled, to book 12,00 hours a day in total"     Const msg2 As String = "When working Offshore you are only entitled, to book 8,00 hours per travel in total"     Const msg3 As String = "Please consider, to give detailed description and with an NCR number if applicable"     Const msg4 As String = "When Indirect time, check your garanteed hours for this day, " &amp; msg_Guaranteed     Const msg5 As String = "When Indirect time, check your garanteed hours for this day, " &amp; msg_Guaranteed     Const msg6 As String = "When Indirect time, check your garanteed hours for this day, " &amp; msg_Guaranteed     Const msg7 As String = "When Indirect time, check your garanteed hours while at Home, " &amp; msg_Guaranteed     Const msg8 As String = "Offshore Transport hours, are not to exceed 12,00 hours per day"          On Error GoTo wsc_exit          Application.EnableEvents = False          If Intersect(Target, Me.Range("F6:F123,M6:M123,N6:N123")) Is Nothing Then Exit Sub          If Me.Cells(Target.Row, "S").Value &gt; 8 Then                  Select Case Me.Cells(Target.Row, "F").Value                      Case "Transport Hotel/Site - Site/Hotel":                       feedback = msg1         Case "Travelling Onshore (home/site - site/home - site/site)":  feedback = msg2         Case "Work time Onshore":                                       feedback = msg3         Case "Indirect time on site Offshore":                          feedback = msg4         Case "Indirect time on site Onshore":                           feedback = msg5         Case "Indirect time off site Onshore (abroad)":                 feedback = msg6         Case "Indirect time off site Onshore (home)":                   feedback = msg7         Case "Transport Offshore":                                      feedback = msg8         End Select                  If feedback &lt;&gt; "" Then                          MsgBox msg &amp; vbNewLine &amp; Me.Cells(Target.Row, "F").Value &amp; vbNewLine &amp; vbNewLine &amp; feedback, vbExclamation             Me.Cells(Target.Row, "M").Resize(, 2).Value = ""         End If     End If      wsc_exit:     Application.EnableEvents = True End Sub </pre><br>]]>
   </description>
   <pubDate>Thu, 17 Dec 2015 16:10:17 +0000</pubDate>
   <guid isPermaLink="true">https://forum.excel-regneark.dk/msgbox-hvis_topic2344_post11007.html#11007</guid>
  </item> 
  <item>
   <title><![CDATA[MsgBox hvis :  Udskift dine 2 koder med denne...]]></title>
   <link>https://forum.excel-regneark.dk/msgbox-hvis_topic2344_post11001.html#11001</link>
   <description>
    <![CDATA[<strong>Forfatter:</strong> <a href="https://forum.excel-regneark.dk/member_profile.asp?PF=248">excelent</a><br /><strong>Emne:</strong> 2344<br /><strong>Sendt:</strong> 16.Dec.2015 kl. 20:19<br /><br />Udskift dine 2 koder med denne :<div>&nbsp;</div><div>Private Sub Worksheet_Change(ByVal Target As Range)<br>If Not Intersect(Target, Range("F1:F100")) Is Nothing Then<br>If Target.Value = "Transport Hotel/Site - Site/Hotel" Then MsgBox "You have chosen Transport Hotel/Site - Site/Hotel, When working Offshore you are only entitled, to book 12,00 hours a day in total", vbExclamation<br>If Target.Value = "Travelling Onshore (home/site - site/home - site/site)" Then MsgBox "You have chosen Travelling Onshore (home/site - site/home - site/site), When working Offshore you are only entitled, to book 8,00 hours per travel in total", vbExclamation<br>If Target.Value = "Work time Onshore" Then MsgBox "You have chosen Work time Onshore, Please consider, to give detailed description and with an NCR number if applicable", vbExclamation<br>If Target.Value = "Indirect time on site Offshore" Then MsgBox "You have chosen Indirect time on site Offshore, When Indirect time, check your garanteed hours for this day, your total ammount of hours are not to exceed the guranteed hours", vbExclamation<br>If Target.Value = "Indirect time on site Onshore" Then MsgBox "You have chosen Indirect time on site Offshore, When Indirect time, check your garanteed hours for this day, your total ammount of hours are not to exceed the guranteed hours", vbExclamation<br>If Target.Value = "Indirect time off site Onshore (abroad)" Then MsgBox "You have chosen Indirect time on site Onshore (abroad), When Indirect time, check your garanteed hours for this day, your total ammount of hours are not to exceed the guranteed hours", vbExclamation<br>If Target.Value = "Indirect time off site Onshore (home)" Then MsgBox "You have chosen Indirect time on site Onshore (home), When Indirect time, check your garanteed hours while at Home, your total ammount of hours are not to exceed the guranteed hours", vbExclamation<br>If Target.Value = "Transport Offshore" Then MsgBox "You have chosen Transport Offshore, Offshore Transport hours, are not to exceed 12 hours per day", vbExclamation<br>End If</div><div>If Intersect(Target, Range("S1:S1000")) Is Nothing Then Exit Sub<br>&nbsp; If Target.Value &gt; 8 Then<br>&nbsp;&nbsp;&nbsp; MsgBox "You entered to many hrs. for travelling", vbExclamation<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ActiveCell.Offset(-1, 0).Select<br>&nbsp;&nbsp;&nbsp; Target = ""<br>&nbsp; End If</div><div>End Sub</div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Wed, 16 Dec 2015 20:19:39 +0000</pubDate>
   <guid isPermaLink="true">https://forum.excel-regneark.dk/msgbox-hvis_topic2344_post11001.html#11001</guid>
  </item> 
  <item>
   <title><![CDATA[MsgBox hvis : Hej, Jespergn&#180;s fors&#248;g virker...]]></title>
   <link>https://forum.excel-regneark.dk/msgbox-hvis_topic2344_post10996.html#10996</link>
   <description>
    <![CDATA[<strong>Forfatter:</strong> <a href="https://forum.excel-regneark.dk/member_profile.asp?PF=873">Mikkel</a><br /><strong>Emne:</strong> 2344<br /><strong>Sendt:</strong> 16.Dec.2015 kl. 13:19<br /><br />Hej, <br><br>Jespergn´s forsøg virker ikke helt efter hensigten, desværre kommer den op med MsgBox i samtlige celler, uden at der er nogen værdi.<br><br>Mikkel<br>]]>
   </description>
   <pubDate>Wed, 16 Dec 2015 13:19:27 +0000</pubDate>
   <guid isPermaLink="true">https://forum.excel-regneark.dk/msgbox-hvis_topic2344_post10996.html#10996</guid>
  </item> 
  <item>
   <title><![CDATA[MsgBox hvis :  Public Sub FindHours()Dim sht...]]></title>
   <link>https://forum.excel-regneark.dk/msgbox-hvis_topic2344_post10995.html#10995</link>
   <description>
    <![CDATA[<strong>Forfatter:</strong> <a href="https://forum.excel-regneark.dk/member_profile.asp?PF=1245">jespergn</a><br /><strong>Emne:</strong> 2344<br /><strong>Sendt:</strong> 16.Dec.2015 kl. 12:51<br /><br /><p>Public Sub FindHours()</p><p>Dim sht As Worksheet<br>Dim LastRow As Long<br>Dim i As Long</p><p>Set sht = ThisWorkbook.Worksheets("Ark1")</p><p>&nbsp;&nbsp;&nbsp; LastRow = sht.Cells(sht.Rows.Count, "S").End(xlUp).Row<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; For i = 1 To LastRow<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Cells(i, 19) &gt; 8 Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MsgBox "You entered to many hrs. for travelling in row " &amp; i<br>&nbsp;&nbsp;&nbsp; End If</p><p>Next i<br>End Sub</p><div>Skift Ark1 ud med arket på dit navn.</div>]]>
   </description>
   <pubDate>Wed, 16 Dec 2015 12:51:08 +0000</pubDate>
   <guid isPermaLink="true">https://forum.excel-regneark.dk/msgbox-hvis_topic2344_post10995.html#10995</guid>
  </item> 
  <item>
   <title><![CDATA[MsgBox hvis : Hej Forum, Jeg kan ikke rigtigt...]]></title>
   <link>https://forum.excel-regneark.dk/msgbox-hvis_topic2344_post10990.html#10990</link>
   <description>
    <![CDATA[<strong>Forfatter:</strong> <a href="https://forum.excel-regneark.dk/member_profile.asp?PF=873">Mikkel</a><br /><strong>Emne:</strong> 2344<br /><strong>Sendt:</strong> 15.Dec.2015 kl. 16:13<br /><br />Hej Forum, <br><br>Jeg kan ikke rigtigt få denne stump til at virke.<br><br>Meningen er den skal løbe gennem kolonne S og checke om der er tal over 8!<br>Er der det skal den komme op med en boks, med en besked.<br><br>koden ser således ud:<br><br>Private Sub Worksheet_Calculate()<br>&nbsp; If Intersect(Target, Range("S:S")) Is Nothing Then Exit Sub<br>&nbsp;&nbsp;&nbsp; If Target.Value = "&gt;8" Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MsgBox "You entered to many hrs. for travelling", vbExclamation<br>&nbsp;&nbsp;&nbsp; End If<br>End Sub<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br><br>Private Sub Worksheet_Change(ByVal Target As Range)<br>If Intersect(Target, Range("F1:F100")) Is Nothing Then Exit Sub<br>If Target.Value = "Transport Hotel/Site - Site/Hotel" Then MsgBox "You have chosen Transport Hotel/Site - Site/Hotel, When working Offshore you are only entitled, to book 12,00 hours a day in total", vbExclamation<br>If Target.Value = "Travelling Onshore (home/site - site/home - site/site)" Then MsgBox "You have chosen Travelling Onshore (home/site - site/home - site/site), When working Offshore you are only entitled, to book 8,00 hours per travel in total", vbExclamation<br>If Target.Value = "Work time Onshore" Then MsgBox "You have chosen Work time Onshore, Please consider, to give detailed description and with an NCR number if applicable", vbExclamation<br>If Target.Value = "Indirect time on site Offshore" Then MsgBox "You have chosen Indirect time on site Offshore, When Indirect time, check your garanteed hours for this day, your total ammount of hours are not to exceed the guranteed hours", vbExclamation<br>If Target.Value = "Indirect time on site Onshore" Then MsgBox "You have chosen Indirect time on site Offshore, When Indirect time, check your garanteed hours for this day, your total ammount of hours are not to exceed the guranteed hours", vbExclamation<br>If Target.Value = "Indirect time off site Onshore (abroad)" Then MsgBox "You have chosen Indirect time on site Onshore (abroad), When Indirect time, check your garanteed hours for this day, your total ammount of hours are not to exceed the guranteed hours", vbExclamation<br>If Target.Value = "Indirect time off site Onshore (home)" Then MsgBox "You have chosen Indirect time on site Onshore (home), When Indirect time, check your garanteed hours while at Home, your total ammount of hours are not to exceed the guranteed hours", vbExclamation<br>If Target.Value = "Transport Offshore" Then MsgBox "You have chosen Transport Offshore, Offshore Transport hours, are not to exceed 12 hours per day", vbExclamation<br><br><br>End Sub<br><br><br>]]>
   </description>
   <pubDate>Tue, 15 Dec 2015 16:13:05 +0000</pubDate>
   <guid isPermaLink="true">https://forum.excel-regneark.dk/msgbox-hvis_topic2344_post10990.html#10990</guid>
  </item> 
 </channel>
</rss>