Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » Visual Basic for Applications

Post new topic   Reply to topic
A
View previous topic :: View next topic  
Author Message
wezel
Freshman


Joined: 09 Oct 2003
Posts: 30

PostPosted: Feb 18th, 2004 06:25 AM    Post subject: A Reply with quote

Hey folks,
I was wondering how I can put text in a cell. I haven't got much VBA expirience. Here's the code I use:
Sub AddNota()
Dim strinputDate As String, strInputNota As String
Dim intLoop As Integer
intLoop = 4
strinputDate = InputBox("Op welke datum wilt u een nota zetten ?", "Nota Bijvoegen")

If strinputDate = "vbCancel" Or strinputDate = "" Then
Exit Sub
End If

strInputNota = InputBox("Welke nota wilt u bijvoegen ?", "Nota Bijvoegen")

If strInputNota = "vbCancel" Or strInputNota = "" Then
Exit Sub
End If

Do While Sheet2.Range("B" & intLoop).Text <> ""
intLoop = intLoop + 1
Loop
Sheet2.Range("B" & intLoop).Text = strinputDate
Sheet2.Range("C" & intLoop).Text = strInputNota
End Sub

This doesn't work.. any Idea how it should work ?
_________________
Real Programmers don't comment their code - it's hard to write, it should be hard to read
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » Visual Basic for Applications All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic