Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Is there any way to take the contents of a cell & add that to the text you programme into a Msg Box in VB? For example, lets say cell A1 has the following formula "=Now()", meaning text that says "10/05/06 13:47" & I want the Msg Box to read "You Logged Out At 10/05/06 13:47." Is there a way of sinking this formula into the VB code for a Msg Box? On a spreadsheet i would obviously use (="You Logged Out At "&A1&"."), but VB is getting confusing! Any help gratefully receieved cheers jb |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Msgbox "You are Logged Out At" & Format(Range("A1").Value, "dd.mm.yy hh:mm")
& "." -- HTH Bob Phillips (remove xxx from email address if mailing direct) "JB2010" wrote in message ... Hi Is there any way to take the contents of a cell & add that to the text you programme into a Msg Box in VB? For example, lets say cell A1 has the following formula "=Now()", meaning text that says "10/05/06 13:47" & I want the Msg Box to read "You Logged Out At 10/05/06 13:47." Is there a way of sinking this formula into the VB code for a Msg Box? On a spreadsheet i would obviously use (="You Logged Out At "&A1&"."), but VB is getting confusing! Any help gratefully receieved cheers jb |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Many thanks, just what i needed
cheers jb "Bob Phillips" wrote: Msgbox "You are Logged Out At" & Format(Range("A1").Value, "dd.mm.yy hh:mm") & "." -- HTH Bob Phillips (remove xxx from email address if mailing direct) "JB2010" wrote in message ... Hi Is there any way to take the contents of a cell & add that to the text you programme into a Msg Box in VB? For example, lets say cell A1 has the following formula "=Now()", meaning text that says "10/05/06 13:47" & I want the Msg Box to read "You Logged Out At 10/05/06 13:47." Is there a way of sinking this formula into the VB code for a Msg Box? On a spreadsheet i would obviously use (="You Logged Out At "&A1&"."), but VB is getting confusing! Any help gratefully receieved cheers jb |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
MsgBox "You Logged Out At " & range("A1").Text
HTH -- AP "JB2010" a écrit dans le message de news: ... Hi Is there any way to take the contents of a cell & add that to the text you programme into a Msg Box in VB? For example, lets say cell A1 has the following formula "=Now()", meaning text that says "10/05/06 13:47" & I want the Msg Box to read "You Logged Out At 10/05/06 13:47." Is there a way of sinking this formula into the VB code for a Msg Box? On a spreadsheet i would obviously use (="You Logged Out At "&A1&"."), but VB is getting confusing! Any help gratefully receieved cheers jb |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
forget the now cell and try this
Sub timeinmsgbox() MsgBox "You " & Time End Sub -- Don Guillett SalesAid Software "JB2010" wrote in message ... Hi Is there any way to take the contents of a cell & add that to the text you programme into a Msg Box in VB? For example, lets say cell A1 has the following formula "=Now()", meaning text that says "10/05/06 13:47" & I want the Msg Box to read "You Logged Out At 10/05/06 13:47." Is there a way of sinking this formula into the VB code for a Msg Box? On a spreadsheet i would obviously use (="You Logged Out At "&A1&"."), but VB is getting confusing! Any help gratefully receieved cheers jb |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() MsgBox "You Logged Out At "&Now&"." or MsgBox "You Logged Out At "&Range("A1")&"." Regards, Stefi €žJB2010€ť ezt Ă*rta: Hi Is there any way to take the contents of a cell & add that to the text you programme into a Msg Box in VB? For example, lets say cell A1 has the following formula "=Now()", meaning text that says "10/05/06 13:47" & I want the Msg Box to read "You Logged Out At 10/05/06 13:47." Is there a way of sinking this formula into the VB code for a Msg Box? On a spreadsheet i would obviously use (="You Logged Out At "&A1&"."), but VB is getting confusing! Any help gratefully receieved cheers jb |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Not much change in what you have already: MsgBox "You logged out on " & Now() regards Paul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy cell contents, then paste into the same cell with other text. | Excel Discussion (Misc queries) | |||
Can I out the contents of a text box into a cell? | Excel Discussion (Misc queries) | |||
Display contents of cell in another cell as part of text string? | New Users to Excel | |||
evaluating text cell contents | Excel Discussion (Misc queries) | |||
Cell only shows link in text, not contents of reference cell | New Users to Excel |