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
 

Some videos you may like

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Roderick_E

Well-known Member
Joined
Oct 13, 2007
Messages
2,051
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.
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,271
Office Version
  1. 365
Platform
  1. Windows
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.
 

Roderick_E

Well-known Member
Joined
Oct 13, 2007
Messages
2,051
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"
 

Roderick_E

Well-known Member
Joined
Oct 13, 2007
Messages
2,051
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,127,569
Messages
5,625,575
Members
416,119
Latest member
JCLLE

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
Top