+ Reply to Thread
Results 1 to 2 of 2

ChangeLink with variable new name

  1. #1
    Registered User
    Join Date
    09-03-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    12

    ChangeLink with variable new name

    Hi,

    I set up a userform that lists the content of a folder in a combobox.
    I want to use the value selected by the user in the combobox as the name of the new file in a change link function.
    I am getting an error Method ChangeLink of object workbook failed.

    Here is the OK command in the form to trigger the ChangeLink:

    Please Login or Register  to view this content.
    I had declared the BBVariant as public as follows:

    Please Login or Register  to view this content.
    Here is the ChangeLinks sub

    Please Login or Register  to view this content.
    Of course, if I leave the on error resume next in, then I don't get the error message but the link is not updated.

    Many thanks for your help.

    Dee

  2. #2
    Registered User
    Join Date
    09-03-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: ChangeLink with variable new name

    I managed to get my code to work.

    Instead of using the variable BBVariant, I used the following in the ChangeLink :

    Please Login or Register  to view this content.
    Why could not I store the result of the combobox selection as a variable and re-use it in the ChangeLink formulae ?

    I would be SO grateful if somebody could explain this.

    Dee

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1