Inputting from message box
Hey guys,
Simple questions. Im trying to get a imput box come up when you open the worksheet that asks for your name. Then it takes what you inputted and puts it into a the cell E8 in a sheet named Summary. I have this so far: Dim Message1, Title1, MyValues Message = "Please enter your name (First and Last)" Title = "Name" '<--Change MyValues = InputBox(Message, Title) Thanks! |
Inputting from message box
Try even simpler:
Sub Auto_open() Sheets("Summary").Range("E8").Value = _ InputBox("Yo name:", "Important") End Sub HTH. Best wishes Harald "Ewing25" wrote in message ... Hey guys, Simple questions. Im trying to get a imput box come up when you open the worksheet that asks for your name. Then it takes what you inputted and puts it into a the cell E8 in a sheet named Summary. I have this so far: Dim Message1, Title1, MyValues Message = "Please enter your name (First and Last)" Title = "Name" '<--Change MyValues = InputBox(Message, Title) Thanks! |
Inputting from message box
Dim Message1, Title1, MyValues
Message = "Please enter your name (First and Last)" Title = "Name" '<--Change MyValues = InputBox(Message, Title) Sheets("Summary").Range("E8") = MyValues "Ewing25" wrote: Hey guys, Simple questions. Im trying to get a imput box come up when you open the worksheet that asks for your name. Then it takes what you inputted and puts it into a the cell E8 in a sheet named Summary. I have this so far: Dim Message1, Title1, MyValues Message = "Please enter your name (First and Last)" Title = "Name" '<--Change MyValues = InputBox(Message, Title) Thanks! |
Inputting from message box
On Jun 2, 2:19*pm, Ewing25 wrote:
Hey guys, Simple questions. Im trying to get a imput box come up when you open the worksheet that asks for your name. Then it takes what you inputted and puts it into a the cell E8 in a sheet named Summary. I have this so far: Dim Message1, Title1, MyValues * * *Message = "Please enter your name (First and Last)" * * Title = "Name" *'<--Change * * MyValues = InputBox(Message, Title) Thanks! Dim Message1 As String, Title1 As String Dim MyValues As String Message = "Please enter your name (First and Last)" Title = "Name" '<--Change MyValues = InputBox(Message, Title) If MyValues < vbNullString Then _ Sheets("Summary").Range("E8").Value = MyValues |
Inputting from message box
Great thanks!
"JLGWhiz" wrote: Dim Message1, Title1, MyValues Message = "Please enter your name (First and Last)" Title = "Name" '<--Change MyValues = InputBox(Message, Title) Sheets("Summary").Range("E8") = MyValues "Ewing25" wrote: Hey guys, Simple questions. Im trying to get a imput box come up when you open the worksheet that asks for your name. Then it takes what you inputted and puts it into a the cell E8 in a sheet named Summary. I have this so far: Dim Message1, Title1, MyValues Message = "Please enter your name (First and Last)" Title = "Name" '<--Change MyValues = InputBox(Message, Title) Thanks! |
Inputting from message box
That is efficient, but if you want to use the value again, you still need a
variable. "Harald Staff" wrote: Try even simpler: Sub Auto_open() Sheets("Summary").Range("E8").Value = _ InputBox("Yo name:", "Important") End Sub HTH. Best wishes Harald "Ewing25" wrote in message ... Hey guys, Simple questions. Im trying to get a imput box come up when you open the worksheet that asks for your name. Then it takes what you inputted and puts it into a the cell E8 in a sheet named Summary. I have this so far: Dim Message1, Title1, MyValues Message = "Please enter your name (First and Last)" Title = "Name" '<--Change MyValues = InputBox(Message, Title) Thanks! |
All times are GMT +1. The time now is 11:39 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com