Hello
How to get office version into IF
IF office version = 2016 then..
IF office version = 2019 then..
IF office version = 2021 then..
Hello
How to get office version into IF
IF office version = 2016 then..
IF office version = 2019 then..
IF office version = 2021 then..
dont understand the question ?
is this how to BUY office versions
or how to use
or is it how to use an IF() function in those versions - IF() is used the same in all 3 versions
A sample sheet would help here
The forum does allow for spreadsheets to be uploaded direct to the forum -
Please see the Yellow Banner at the top of the page explaining how to attach a sample spreadsheet
A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.
Here are the instructions, found at the top of the page again
Post a small Excel sheet (not a picture) showing realistic & representative sample data WITHOUT confidential information (10-20 rows, not thousands...) and some manually calculated results. For a new thread (1st post), scroll to Manage Attachments, otherwise scroll down to GO ADVANCED, click, and then scroll down to MANAGE ATTACHMENTS and click again. Now follow the instructions at the top of that screen.
Wayne
if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here
If you have a solution to your thread - Please mark your thread solved do the following: >
Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.
I need vba to get office version inside IF statment
If office version is 2016 then do.....
end if
If office version is 2019 then do.....
end if
If office version is 2021 then do.....
end if
thats what I mean
.
Hi. Are you looking for this?
MsgBox "Welcome to Microsoft Excel version: " & Application.Version
You are always very welcome if you add reputation by clicking the * (bottom left) of each message that has helped you.
Almost there
if Application.Version = "X" then....
Which number mean version 2016,2019,2021?
.
Maybe the following link will help you: Check the application version in Modern Office
I'm using:
Microsoft Excel for Microsoft 365 MSO (Version 2304 Build 16.0.16316.2000) 64 Bit
Microsoft 365 Insider Beta Channel
Application.Version shows 16.0 for me.
Ken Puls' code from the attached link shows 365.
https://excelguru.ca/check-the-appli...comment-354105
Slightly modified version of the code and a calling routine:
MsgBox shows 365Please Login or Register to view this content.
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
???
Please Login or Register to view this content.
Thanks to @mjr veverka for filling in the gaps in Ken Puls's function.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks