+ Reply to Thread
Results 1 to 7 of 7

Can not change Name of a QR image using a variable

  1. #1
    Valued Forum Contributor
    Join Date
    08-07-2014
    Location
    Quito, Ecuador
    MS-Off Ver
    Excel 2016 & 365, Windows 10
    Posts
    511

    Can not change Name of a QR image using a variable

    Good day to all of you..

    I'm trying to change the name of the image of a QR Code obtained, when I try to use a variable to assign the name.
    When I do it using a direct text it works fine.

    By sure it's something simple I'm missing.
    Thanks for your help



    Please Login or Register  to view this content.
    Happy Holidays!
    Vicho
    Last edited by vichopalacios; 12-19-2022 at 04:19 PM.
    Barriers are there for those who don't want to dream

  2. #2
    Forum Expert CheeseSandwich's Avatar
    Join Date
    12-22-2021
    Location
    Kent, England
    MS-Off Ver
    365 - 2404-17531.20128
    Posts
    1,361

    Re: Can not change Name of a QR image using a variable

    Try:
    Please Login or Register  to view this content.
    If things don't change they stay the same

  3. #3
    Valued Forum Contributor
    Join Date
    08-07-2014
    Location
    Quito, Ecuador
    MS-Off Ver
    Excel 2016 & 365, Windows 10
    Posts
    511

    Re: Can not change Name of a QR image using a variable

    Thank for your answer, @CheeseSandwich
    but still the same problem.
    I'm attaching a sample book
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,150

    Re: Can not change Name of a QR image using a variable

    Use "," instead of "." in Cells(2.1) part of the the following line;

    Please Login or Register  to view this content.
    That is, it should be;

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Hi, try this !


    According to the attachment a starter VBA demonstration :

    PHP Code: 
    Sub Demo1()
            
    Dim N$, oPic As PictureP#
        
    With Hoja1
            N 
    = .[A2]
        For 
    Each oPic In .Pictures
              
    If oPic.Name N Then oPic.DeleteSet oPic Nothing: Exit For
        
    Next
            P 
    Application.InchesToPoints(.[A3])
           .
    Shapes.AddPicture("https://chart.googleapis.com/chart?cht=qr&chs=" "x" _
                    P 
    "& chl=" & .[A1], 0, -1, .[C3].Left, .[C3].TopPP).Name N
        End With
    End Sub 
    ► Do you like it ? ► So thanks to click on bottom left star icon « Add Reputation » !

  6. #6
    Valued Forum Contributor
    Join Date
    08-07-2014
    Location
    Quito, Ecuador
    MS-Off Ver
    Excel 2016 & 365, Windows 10
    Posts
    511

    Re: Can not change Name of a QR image using a variable

    Use "," instead of "." in Cells(2.1) part of the the following line;
    did not see this typo, I was blind
    Thank you Haluk.

  7. #7
    Valued Forum Contributor
    Join Date
    08-07-2014
    Location
    Quito, Ecuador
    MS-Off Ver
    Excel 2016 & 365, Windows 10
    Posts
    511

    Re: Hi, try this !

    @ Marc

    Thanks for this Sub Demo()

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Macro to change the background image and copy the image filename into a cell
    By Zenarte in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 03-27-2022, 02:51 PM
  2. Change Image Control using Data Validation Worksheet Change with pictures from my WorkBook
    By goncalo.coelho in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-08-2020, 10:12 AM
  3. [SOLVED] Passing the image number as a variable - is it possible??
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-03-2018, 12:17 PM
  4. Replies: 2
    Last Post: 07-02-2013, 03:36 PM
  5. Change colour of Image with change in cell value.
    By jatin_soni in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-01-2013, 01:46 AM
  6. image with variable name problem
    By jamielill in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-27-2009, 05:21 PM
  7. Variable IMAGE in document header
    By hhalle in forum Excel General
    Replies: 0
    Last Post: 12-07-2005, 06:14 PM

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