+ Reply to Thread
Results 1 to 3 of 3

How to print a constant in VBA code?

  1. #1
    Forum Contributor
    Join Date
    05-02-2013
    Location
    Indiana
    MS-Off Ver
    Excel 2016
    Posts
    190

    How to print a constant in VBA code?

    I have a simple VBA code to display a constant in a msgbox; however, it does not print the value I have stored there, which is 99. I defined my constant name in the menu FORMULAS/DEFINE NAME with the following information: Name: Start_Time, Scope: Workbook, Refers to: 99.

    Constant_Variable_Help.xlsm

    What am I doing wrong? Thanks, redsab
    Last edited by redsab; 08-24-2013 at 07:59 AM.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: How to print a constant in VBA code?

    Hi, redsab,

    maybe

    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Contributor
    Join Date
    05-02-2013
    Location
    Indiana
    MS-Off Ver
    Excel 2016
    Posts
    190

    Re: How to print a constant in VBA code?

    Thanks, that worked great!
    redsab

+ 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. VBA code to keep numbers constant
    By mkeys4 in forum Excel Programming / VBA / Macros
    Replies: 36
    Last Post: 08-16-2013, 09:21 AM
  2. Constant code interruption...
    By RayJay01 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-22-2013, 07:00 PM
  3. How to define a constant across all vba code such as your main workbook name.
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-09-2011, 10:31 AM
  4. macro code for constant copy but variable paste cell
    By sanpedro_nz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-04-2009, 03:32 AM
  5. Maintenance of Print format not constant?
    By Lazador in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-30-2007, 02:45 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