+ Reply to Thread
Results 1 to 6 of 6

Cell content + Macro code

  1. #1
    Forum Contributor
    Join Date
    10-08-2013
    Location
    End of the World, USA
    MS-Off Ver
    EXCEL 2007
    Posts
    111

    Cell content + Macro code

    How do I substitute any part of Macro code with content from a cell in Excel (e.g. a password that the user writes in Cell A5).

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Cell content + Macro code

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Contributor
    Join Date
    10-08-2013
    Location
    End of the World, USA
    MS-Off Ver
    EXCEL 2007
    Posts
    111

    Re: Cell content + Macro code

    not what I meant, I want to used the content of some cell as replacement for some content in a Macro

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Cell content + Macro code

    Quote Originally Posted by frank35 View Post
    not what I meant, I want to used the content of some cell as replacement for some content in a Macro
    Be more specific. What exactly are you trying to achieve?
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  5. #5
    Forum Contributor
    Join Date
    10-08-2013
    Location
    End of the World, USA
    MS-Off Ver
    EXCEL 2007
    Posts
    111

    Re: Cell content + Macro code

    use a password from some cell that the macro clears automatically (know how to), so the password is not in the macro itself, but you have to enter it every time. Its

    SendKeys ("PASSWORD") for example

    PASSWORD should be content from cell A5

  6. #6
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Cell content + Macro code

    Hard to be more specific than this with your brief requirement, but of course you can use cell content in code:

    Please Login or Register  to view this content.
    Surely it would be nicer to use an inputbox, or better still a userform, to capture manual input of a password, though?

+ 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. Macro code to copy excel sheet content to outlook mail
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-05-2013, 07:18 AM
  2. Combine cell content into an html code?
    By jake5 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 06-03-2013, 01:40 AM
  3. What code for macro to copy selected cell content
    By BlastRanger in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-23-2010, 01:29 AM
  4. what code can delete cell content
    By colwyn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-26-2008, 08:19 AM
  5. Formatting Code Based on Cell Content
    By Hulk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-17-2005, 12:35 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