+ Reply to Thread
Results 1 to 6 of 6

Information in ".Caption" from menu item

  1. #1
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    548

    Information in ".Caption" from menu item

    The code below creates menu items. When clicked, .OnAction is used to call the macro (which opens a file).
    I have a variable number of files but only want to use the one procedure.
    How can I transfer the information stored in .Caption to Sub OpenFileNominal.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Information in ".Caption" from menu item

    Hi,

    You might use
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    548

    Re: Information in ".Caption" from menu item

    Thank you very much. It works.

  4. #4
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    548

    Re: Information in ".Caption" from menu item

    If a filename has a dot (.) in it, it won't work though.

  5. #5
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Information in ".Caption" from menu item

    It should work, provided you are including the extension in the file name.

  6. #6
    Forum Contributor
    Join Date
    11-10-2009
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    548

    Re: Information in ".Caption" from menu item

    Quote Originally Posted by xlnitwit View Post
    It should work, provided you are including the extension in the file name.
    Yes, that's true but is it possible to show the caption without the extension.

+ 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. Menu item for "Select cells directly referred"
    By vikas.bhandari in forum Excel General
    Replies: 1
    Last Post: 08-31-2009, 07:40 AM
  2. "temporary" menu item in Excel
    By Dutch76 in forum Excel General
    Replies: 1
    Last Post: 01-27-2006, 08:50 AM
  3. Custom Menu Item Randomly "Checked"
    By durex in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-11-2005, 09:51 PM
  4. [SOLVED] Excel should have a "Change Case..." menu Item like Word!!
    By Octapus’gardenintheshade in forum Excel General
    Replies: 1
    Last Post: 11-22-2005, 02:35 PM
  5. [SOLVED] Menu Item Action Changes with "User" accessing file
    By windsurferLA in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-15-2005, 03:05 PM
  6. [SOLVED] Why is the menu item "Insert - Name" greyed out?
    By Chuck in forum Excel General
    Replies: 2
    Last Post: 03-07-2005, 02:06 PM
  7. [SOLVED] How to disable the "Insert Copied Cells" context menu item
    By Coen in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 02-09-2005, 06:06 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