+ Reply to Thread
Results 1 to 2 of 2

How to assign variable when adding Name?

  1. #1
    Registered User
    Join Date
    11-15-2019
    Location
    hk
    MS-Off Ver
    2016
    Posts
    7

    How to assign variable when adding Name?

    Is it possible to assign variable when adding name?
    following code no longer compile after I added "set nm = "
    I am using assigned variable for Debug.Print added name.

    Please Login or Register  to view this content.
    Last edited by sunnyschindler; 08-22-2023 at 01:15 AM. Reason: Reason for post

  2. #2
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,002

    Re: How to assign variable when adding Name?

    It's not clear which sheet .Range("D1:E10") refers to and myWorksheet is undefined.

    Maybe this is what you're looking for.

    Please Login or Register  to view this content.

+ 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] User defined type: assign a variable to another variable
    By BNCOXUK in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-05-2019, 10:51 AM
  2. [SOLVED] How to extract a piece of a string variable, and assign to a new variable
    By jmccoughlin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-04-2015, 11:50 PM
  3. [SOLVED] Assign entire row to variable, how do you paste variable values in a new workbook?
    By tv69 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2013, 08:01 PM
  4. Replies: 4
    Last Post: 07-12-2013, 12:14 PM
  5. Replies: 2
    Last Post: 07-24-2012, 11:47 AM
  6. Assign value to a variable name
    By Gnarlodious in forum Excel General
    Replies: 2
    Last Post: 08-20-2006, 02:15 AM
  7. Assign value to variable
    By rroach in forum Excel General
    Replies: 1
    Last Post: 07-13-2005, 01:05 AM

Tags for this Thread

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