I noticed that Office 2010 comes with Visual Basic for Applications 7.0. However I can't seem to find much documentation on what changes were made. Does anyone have a summary of the changes, or any resources describing the differences?
相关问题
- Error handling only works once
- Excel formula in VBA code
- Converting byte array output into Blob corrupts fi
- Excel VBA run time error 450 from referencing a ra
- DoCmd.TransferSpreadsheet is not recognizing works
相关文章
- Directly signing an Office Word document using XML
- Unregister a XLL in Excel (VBA)
- numeric up down control in vba
- Declare a Range relative to the Active Cell with V
- How to disable changes in a cell using vba?
- MsgBox Yes/No Excel VBA
- Rounding up to nearest higher integer in VBA
- Excel merge cell date and time
There are other changes as well... I'm having users in the field report that code which functioned properly in 2007 no longer works and shows errors.
Example, this works in VBA6 (Excel 2007)
It prints out a line made of "=" characters as a visual break, then looks at mydata, jumps over 15 characters and gets 4 of them, the result is stored in mynewdata. It fails in VBA7 (Excel 2010).
I did find a potential workaround...
OR
A complete list of changes would still be helpful... and/or a file converter.
VBA7 is compatible with 64-bit versions of Office.
This piece on MSDN has more on the changes in VBA 7 for Office 2010:
http://msdn.microsoft.com/en-us/library/ee691831(loband).aspx#odc_office2010_Compatibility32bit64bit_IntroducingVBA7CodeBase
There's not a whole lot that has changed between VBA6 and VBA7. VBA7 was introduced to support 64-bit versions of both Office and Windows (see below on what those differences are). Here are the key changes:
64-bit support, primarily for API calls. This is both used to make your code work with your OS/Office version as well as others' (i.e. someone on Office 2003/WinXP)
If you are on a 64-bit version of Windows, but are on a 32-bit version of Office, you can declare API calls like below. .
If you are on a 64-bit version of Windows, and are on a 64-bit version of Office, you can declare API calls like: .
To support this, there are:
Three new keywords (2 data types and 1 modifier):
LongPtr
,LongLong
andPtrSafe
One new function:
CLngLng()
(i.e. Int64)The new compilation constants as used above:
VBA7
andWin64