D DawningTruth Active Member Licensed User Sep 22, 2019 #1 This sub will assist you to determine the current orientation of your activity. I noticed that the solutions to this one on the forum are quite complicated or resource intensive. Here is a Sub you can use, which is very simple and uses minimal resources. Hope it helps someone. Code: Copy Sub DetermineCurrentScreenOrientation As String Dim orientation As String If Activity.Height > Activity.Width Then orientation = "portrait" Else orientation = "landscape" End If Return orientation End Sub
This sub will assist you to determine the current orientation of your activity. I noticed that the solutions to this one on the forum are quite complicated or resource intensive. Here is a Sub you can use, which is very simple and uses minimal resources. Hope it helps someone. Code: Copy Sub DetermineCurrentScreenOrientation As String Dim orientation As String If Activity.Height > Activity.Width Then orientation = "portrait" Else orientation = "landscape" End If Return orientation End Sub
Brandsum Well-Known Member Licensed User Sep 22, 2019 #2 You should post a code snippet to the code snippet section Upvote 0
D DawningTruth Active Member Licensed User Sep 22, 2019 #3 Brandsum said: You should post a code snippet to the code snippet section Click to expand... Excellent suggestion, will do. Upvote 0
Brandsum said: You should post a code snippet to the code snippet section Click to expand... Excellent suggestion, will do.