Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / VS Tools for Office / March 2007

Tip: Looking for answers? Try searching our database.

Array problem converting from VBA to VSTO

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Waxaholic - 04 Mar 2007 18:20 GMT
I am having an issue trying to convert this VBA code to VSTO
compatibility. It is complaining about the =Array part. I am creating
a sorting rule within excel to speed up sorting of an imported .csv
file.
App.AddCustomList(ListArray:=Array("UAR", "PD", "TES1")

Has anyone solved a similair issue or can point me into the right
direction?

Thanks,
keremskusmezer@gmail.com - 05 Mar 2007 12:34 GMT
> I am having an issue trying to convert this VBA code to VSTO
> compatibility. It is complaining about the =Array part. I am creating
[quoted text clipped - 6 lines]
>
> Thanks,

Hi,

Use the following code:

Dim tpsheets() As Object
ReDim tpsheets(2)
tpsheets(0) = "UAR"
tpsheets(1) = "PD"
tpsheets(2) = "TEST"
App.AddCustomList(ListArray:=tpsheets)

this should solve your problem possibly.
Waxaholic - 10 Mar 2007 04:06 GMT
On Mar 5, 6:34 am, "keremskusme...@gmail.com"
<keremskusme...@gmail.com> wrote:

> > I am having an issue trying to convert this VBA code to VSTO
> > compatibility. It is complaining about the =Array part. I am creating
[quoted text clipped - 19 lines]
>
> this should solve your problem possibly.

This worked perfectly. Thank you.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.