Results 1 to 10 of 10

Setting a Global Variable

Threaded View

  1. #1
    Forum Contributor
    Join Date
    05-24-2014
    MS-Off Ver
    Microsoft Office 2013
    Posts
    113

    Setting a Global Variable

    So I've read quite a few things on global variables but none of it has made sense to me. I want to set a variable that works in all my modules to set the name of my printer for each macro. Here is the code that I have within each macro and I just want it in one place because it seems like whenever I restart my computer or have to unhook the printer it changes the Ne##. If anyone knows how to prevent that from happening that would be great as well. Thanks for any help.

    Dim printer_name As String
            printer_name = "DYMO LabelWriter 450 on Ne04:"
    Last edited by manofcheese; 06-17-2014 at 10:44 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Global variable declared in Userform. Variable value is not sticking
    By timtim89 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-25-2012, 08:50 AM
  2. Setting Global Variable from a UserForm
    By agwright in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-03-2009, 09:59 AM
  3. Setting a Global Variable
    By ChemistB in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-29-2008, 10:51 AM
  4. [SOLVED] Setting form caption based on global variable
    By JNW in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-20-2006, 05:50 PM
  5. Setting a Custom Class as a Global variable
    By Xiazer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-31-2006, 06:55 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