Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL (Archived)

VBA_SetAddr type mismatch

Posted on by 900

In the process of upgrading SL 7. On one of the screens, I changed  Call SetAddr(NOLEVEL, "bAccount", bAccount, nAccount, LenB(bAccount)) to  Call VBA_SetAddr(NOLEVEL, "bAccount", bAccount, nAccount, LenB(bAccount))

 But now I am getting "Type mismatch" on nAccount. Thoughts?

 

*This post is locked for comments

  • Q Profile Picture
    Q 900 on at
    Re: Re: Re: VBA_SetAddr type mismatch

    Yes, I looked at VBA_SetAddr function definition and figured that out. Thank you all for the responses.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: VBA_SetAddr type mismatch

     Hi,

    Chris: You are correct. In SL7 customizations, VBA_SetAddr accepts only 4 arguments.

    Please use the below syntax to resolve the "Type mismatch" error.

    Call VBA_SetAddr("bAccount", bAccount, nAccount, LenB(bAccount))

    Thanks & Regards

    D.Santhosh

  • Chris Schack Profile Picture
    Chris Schack on at
    Re: Re: VBA_SetAddr type mismatch

    Hi Q,

    I beleive that the VBA_Set Addr statement has changed recently and it now only accepts 4 arguments. See below for an example:

     

    Call VBA_SetAddr(TableNameStr, bTableName, nTableName, bTableNameLength)

     

    Hope this helps.


    Thanks,.

    Chris Schack

  • pbrattin Profile Picture
    pbrattin 1,850 on at
    Re: VBA_SetAddr type mismatch

    Do you have the DH file for the Account table in your VBA program? That DH file sets the Type for the table.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans