471,049 Members | 1,443 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,049 software developers and data experts.

Excel VBA Paste of Range with PrefixCharacter fails from VB.NET dll

Operating System: Microsoft Windows Version 5.1 (Build
2600.xpsp_sp2_gdr.050301-1519 : Service Pack 2)

Visual Basic: MIcrosoft Visual Basic 6.3 Version 9972 VBA: Retail
6.4.9972 Forms3: 11.0.6550 (comes with Excel 2003)

The copy paste code below fails to copy the PrefixCharacter from cell
"a1" to cell "a2" when compiled into a dll and called from VBA, yet
running from a VB.NET main program the PrefixCharacter is copied, as
it is when done in a pure VBA module.
With Microsoft.Office.Interop.Excel.Application.Actives heet
End WIth
The following library references are used in the VB.NET project:

Assembly Microsoft.Office.Interop.Excel
C:\WINDOWS\assembly\GAC\Microsoft.Office.Interop.E xcel\\Microsoft.Office.Intero p.Excel.dll

Assembly office
C:\WINDOWS\assembly\GAC\Office\ 1e9429c\

Assembly Microsoft.VisualBasic.Compatibility

Assembly System

Assembly System.Data

Assembly System.Windows.Forms

Assembly Interop.VBA

Assembly Microsoft.Vbe.Interop

C:\WINDOWS\assembly\GAC\Microsoft.Vbe.Interop\11.0 .0.0__71e9bce111e9429c\

and the following "Imports" statements are included:
Imports Microsoft.Office.Interop.Excel
Imports Microsoft.Office.Interop.Excel.Constants
Imports Microsoft.Office.Interop.Excel.XlLookAt
Imports Microsoft.Office.Interop.Excel.XlSearchOrder
Imports Microsoft.Office.Interop.Excel.XlFindLookIn
Imports Microsoft.Office.Interop.Excel.XlDirection
Imports Microsoft.Office.Interop.Excel.XlAxisType
Imports Microsoft.Vbe.Interop
Imports Microsoft.Vbe.Interop.vbext_ComponentType
Thanks for any clues! Nick
Apr 10 '07 #1
0 2194

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by Allison Bailey | last post: by
3 posts views Thread by | last post: by
2 posts views Thread by John Henry | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.