Formatting the text in an input box and setting the format of the resident cell

D

Doctorjones_md

I have the following code with pops up a conditional message box and
inserts Text into Cell D10 (which is prepopulated using =Now() to insert
Date/Time. I need format of Cell D10 to change to General so that the Text
"Closed" -- inserted by the Input Bos will display properly.

Here's my code:

If MsgBox("Is this a Closed Deal?", vbQuestion + vbYesNo) = vbYes Then

Sheets("Analysis").Range("D10").Value = InputBox("Enter CLOSED for a Closed
Deal and CLICK OK, or CLICK Cancel to save an Opportunity?")

End If
'Call RollupTrackingSpecificData

End Sub
=================
How would I modify the code to ensure that the date in the Input Box is
displayed at text in D10?


Thank you in Advance
 
D

Douglas J. Steele

You've posted to a large number of newsgroups related to Access (the
database product that's part of Office Professional), yet your query seems
related to Excel. If that's the case, you'd be best off reposting to a
newsgroup related to Excel.

Remember that you have the luxury of turning on the Macro recorder, carrying
out whatever commands you want manually, and then looking at the VBA code
that's generated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top