Ask Question and Get Free Answers - JUST Ask And Answer > QA > Computers & Internet > Software
Creating popups in Excel?

Answers:1   |   LastAnswerAt:2011.03  

Question
visitor
rajavision108 
Asked at 2011.03.27 23:35:46
I want to write an Excel worksheet that when you open it, the first thing that happens is a popup window that asks the user to enter data into 3 or 4 fields. How would I do this?
answer Nahee_Enterprises  Answered at 2011.03.27 23:35:46
A Comment field will allow you to create a simple popup like message, but that means that Comments will need to be always turned on in the Options for MS-Excel.

To get a more sophisticated message to display will require VBA coding, especially if you want the data to be asked and entered by the messaging routine. I will not be able to give exact details, since you did not specify which cells you wanted to be filled, nor are you sure whether it is 3 or 4 that this is supposed to handle. But here is an example:


Option Explicit
Public strTitle2 As String
Private Sub Workbook_Open()
Do
strTitle2 = InputBox("Please enter one of the following three values: " & vbCrLf & _
" • Board" & vbCrLf & _
" • Staff" & vbCrLf & _
" • All" & vbCrLf & _
"This will be used within the report's Title.", _
"Acquire Report Title", "All")
strTitle2 = StrConv(strTitle2, vbProperCase)
If strTitle2 = "Board" Or strTitle2 = "Staff" Or strTitle2 = "All" Then
Range("A1").Select
Selection.Value = strTitle2
Else
MsgBox "Apparently you are incapable of following simple " & vbCrLf & _
"directions, so give it another attempt!!!"
strTitle2 = vbNullString
End If
Loop Until strTitle2 <> vbNullString
End Sub
1
  • Answer This Question:Creating popups in Excel? 

  • insert image

    image url:

    such as: http://www.justaaa.com/**/**.jpg

    insert video

    vedio url: