Info function in VBA macro

Roderick_E

Well-known Member
Joined
Oct 13, 2007
Messages
2,051
Ok, I looked & looked on the internet to figure out how to use the INFO("release") in a macro.

I want something like,

If info("release")="0" then
'do some stuff
else
'do some other stuff
endif

Thanks for the help
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Try

Code:
Application.Version

instead.

ok thanks I'll try that. The purposes I am doing this may not allow for that if it doesn't work with OpenOffice Novell (I'm trying to determine if the user is using Excel 2000, 2003, 2007 or OpenOffice) BRB with a report.
 
Upvote 0
Roderick

I suppose you could use Evaluate.
Code:
    MsgBox Evaluate("INFO(""release"")")
But I've no idea how that's going to work with OO.
 
Upvote 0
Re: Info function in VBA macro **FOLLOW UP**

ok thanks I'll try that. The purposes I am doing this may not allow for that if it doesn't work with OpenOffice Novell (I'm trying to determine if the user is using Excel 2000, 2003, 2007 or OpenOffice) BRB with a report.

Darn, that is not going to work because it returned "11.0" whether I opened with Excel 2003 or OpenOffice.

Is there no way to use the info function within a macro? Right now how I'm doing it is that I have on a hidden sheet,

=info("release")

Then in a macro I would have code like this:
If sheet("hidden").range("A1")="0" Then
'do something
else
'do something else
endif

=info("release") when opened with OpenOffice returns a string that amounts to "0"
 
Upvote 0
Roderick

I suppose you could use Evaluate.
Code:
    MsgBox Evaluate("INFO(""release"")")
But I've no idea how that's going to work with OO.

Thanks for trying -- worked fine in Excel, errored in OO.
My company only gives Excel to higher ups & OO to lower grunts so my spiffy macros have to be able to work or have alternatives for OO.
 
Upvote 0

Forum statistics

Threads
1,213,562
Messages
6,114,326
Members
448,564
Latest member
ED38

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top