Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default How to Use QuestionToMessageBox with Input for Cell

How can I put in a variable that comes from a named cell in the spreadsheet.

Here's my line, and I'd like

QuestionToMessageBox = ("Are you CERTAIN you've copied the contents of this sheet into a new one?" _

& namedCellFromSheet & " some more text?")
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default How to Use QuestionToMessageBox with Input for Cell

Hi David,

Am Thu, 9 May 2019 23:45:35 -0700 (PDT) schrieb David Godinger:

How can I put in a variable that comes from a named cell in the spreadsheet.

Here's my line, and I'd like

QuestionToMessageBox = ("Are you CERTAIN you've copied the contents of this sheet into a new one?" _

& namedCellFromSheet & " some more text?")


try:

QuestionToMessagebox = MsgBox("Are you CERTAIN you've copied the contents of this sheet into a new one? " _
& Range("Sheet1!NamedCell.Name") & " some more text?", vbYesNo, "Question")


Regards
Claus B.
--
Windows10
Office 2016
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default How to Use QuestionToMessageBox with Input for Cell

Thanks, Claus, it worked perfectly!

The little piece of my VBA ended up looking like: & Range("Chart!nameInsert") &
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Input cell should display a percentage of input value in the cell Sherees Excel Discussion (Misc queries) 0 December 16th 09 10:25 PM
Cell Color changes On Input even if new input matches default JBark Excel Programming 1 September 25th 09 05:24 AM
How to input pictures automatically based on cell input? bsharp Excel Worksheet Functions 9 May 30th 09 07:16 AM
run macro with input msg based on cell input Janelle S Excel Discussion (Misc queries) 0 January 20th 08 05:23 AM
Have user input converted to uppercase in same cell as input? Shannonn New Users to Excel 1 June 20th 06 03:19 AM


All times are GMT +1. The time now is 02:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"