View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default inputbox function

Hi
use
activesheet.range("A1").value=firstname

--
Regards
Frank Kabel
Frankfurt, Germany

"nhanh" schrieb im Newsbeitrag
...

Hi,

I am really new to VBA programming and was seeking some help and this
seems like a great place to do it.

Here is the code that i have at the moment:


Public Sub AddNames()

Dim FirstName As String
FirstName = InputBox("What is your firstname?", "First Name")
ActiveWorkbook.Worksheets("sheet1").Range("B2").Va lue =
_\"=FirstName_"

End Sub


My aim is to get an input box to prompt a user to input their first
name and after the user does so, excel will input the user's name

into
the particular cell. I think my problem is what i've underlined
("=FirstName")... i don't know what i should put after the value to

get
it to do what i need it to do. Maybe i've made other mistakes too?

Any help would be great. Thanks!


--
nhanh
---------------------------------------------------------------------

---
nhanh's Profile:

http://www.excelforum.com/member.php...o&userid=15019
View this thread:

http://www.excelforum.com/showthread...hreadid=266371