Is it possible to check which version of Excel a user's computer will open while in a VB6 application?

Some users will be using Excel 2003 and some will be using Excel 2007 and, in theory, a single command button will open one of two excel sheets based on which version they have. Is that possible?

Recommended Answers

All 3 Replies

Yes you can -

Dim objXL As Excel.Application
Set objXL = New Excel.Application
MsgBox objXL.Version

I hoped/figured there was something simple like that. Thanks, you're a lifesaver.

Only a pleasure.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.