Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Show Activecell Date in MsgBox

Can the date in the ActiveCell be shown in a MsgBox, allowing the user to
check whether to continue or Cancel the macro running. All data on and below
the ActiveCell is cut and pasted into second sheet.

--
Thank you

Aussie Bob C
Little cost to carry knowledge with you.
Win XP P3 Office 2007 on Mini Mac using VMware.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Show Activecell Date in MsgBox

Hi,

try this

' Lots of code
ttl = "Todays Date"
response = MsgBox(Format(ActiveCell.Value, "DD/mm/yyyy") _
& " Continue Yes/No", vbYesNo, ttl)
If response = vbNo Then Exit Sub

'More code
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Aussie Bob C" wrote:

Can the date in the ActiveCell be shown in a MsgBox, allowing the user to
check whether to continue or Cancel the macro running. All data on and below
the ActiveCell is cut and pasted into second sheet.

--
Thank you

Aussie Bob C
Little cost to carry knowledge with you.
Win XP P3 Office 2007 on Mini Mac using VMware.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Show Activecell Date in MsgBox

dim resp as long

resp = msgbox(Prompt:="Value is: " & format(activecell.value, "mmm dd, yyyy") _
& vblf & "Continue?", buttons:=vbyesno)

if resp = vbno then
exit sub '???
end if

'do the rest.

=====
This doesn't do any checking that the activecell actually contains a date.

Aussie Bob C wrote:

Can the date in the ActiveCell be shown in a MsgBox, allowing the user to
check whether to continue or Cancel the macro running. All data on and below
the ActiveCell is cut and pasted into second sheet.

--
Thank you

Aussie Bob C
Little cost to carry knowledge with you.
Win XP P3 Office 2007 on Mini Mac using VMware.


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Show Activecell Date in MsgBox

Try something like

MsgBox "The date in the active cell is " & _
Format(ActiveCell.Value, "dd-mmm-yyyy"), vbOKOnly

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com



On Mon, 15 Mar 2010 05:38:01 -0700, Aussie Bob C
wrote:

Can the date in the ActiveCell be shown in a MsgBox, allowing the user to
check whether to continue or Cancel the macro running. All data on and below
the ActiveCell is cut and pasted into second sheet.

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
Match Value and Show MsgBox K[_2_] Excel Programming 1 January 14th 09 11:36 AM
Show a message but not in MsgBox RobN[_2_] Excel Discussion (Misc queries) 2 May 30th 08 11:58 PM
MsgBox - Don't Show Again exceller Excel Programming 4 August 19th 04 11:23 PM
Dont show msgbox again Todd Huttenstine Excel Programming 4 April 30th 04 09:51 PM
Show msgbox only when.... Tod Excel Programming 3 July 29th 03 06:21 PM


All times are GMT +1. The time now is 11:52 PM.

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

About Us

"It's about Microsoft Excel"