Release Date: April 3, 2000
For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:
You have royalty-free right to use, modify, reproduce, and distribute any code generated by the B2C Converter, or any modified version of the B2C Converter, in any way you find useful provided that you agree that Microsoft has no warranty, obligations, or liability for the generated code.
B2CSE.exe contains the following files:
B2C.exe was designed to convert simple Automation examples. It was not designed to be a generic conversion utility for all of Visual Basic. As such, you should be aware of the following limitations:
- B2C does not support named-parameters. Do not use code that invokes a method by passing a named parameter:
- B2C does support optional parameters, so you can use code like:
- B2C currently does not calculate expressions. Do not use code like:
MyObj.MyMethod (a+b)/2, a*b, a+1
' Start Excel.
dim app as object
set app = createobject("Excel.Application")
' Make it visible.
app.visible = true
' Add a new workbook.
' Declare an array.
dim arr(1 to 15, 1 to 15) as long
' Fill array with values.
dim i as long
dim j as long
for i = 1 to 15
for j = 1 to 15
arr(i,j) = i
' Set all values in one shot!
app.activesheet.range("A1:O15").value = arr
msgbox "All done."
The generated code uses a helper function called AutoWrap() that is generated in the edit box in the upper-right corner of the B2C.exe dialog box. You need to add this function to your project so that it is accessible from where you use B2C-generated code. Although this function is regenerated every time you convert new code, it is always the same so you only need to copy it once.
The best way to learn how it works, is to run B2C and experiment with the built-in examples.
ID d'article : 216388 - Dernière mise à jour : 20 sept. 2012 - Révision : 1