Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default spreadsheet do not update


hello all, i'm just a beginner at excel & vB so i could use some help
here. I've this code that allows me to enter some information through
a form and it should write to a row in the sheet. Even though it says
"a record has been added!", nothing appears on the sheet. Confused by
this! Will someone help me in this? Thanks!

Private Sub CommandButton1_Click()
Dim LastRow As Object

Set LastRow = Sheet1.Range("a65536").End(xlUp)

LastRow.Offset(1, 0).Value = TextBox1.Text
LastRow.Offset(1, 1).Value = TextBox2.Text
LastRow.Offset(1, 2).Value = TextBox3.Text

MsgBox "One record written to Sheet1"

response = MsgBox("Do you want to enter another record?", _
vbYesNo)

If response = vbYes Then
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""

TextBox1.SetFocus

Else
Unload Me
End I

--
rach8
-----------------------------------------------------------------------
rach85's Profile: http://www.excelforum.com/member.php...fo&userid=1655
View this thread: http://www.excelforum.com/showthread.php?threadid=31415

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default spreadsheet do not update

The first post made it through ok.

rach85 wrote:

hello all, i'm just a beginner at excel & vB so i could use some help
here. I've this code that allows me to enter some information through
a form and it should write to a row in the sheet. Even though it says
"a record has been added!", nothing appears on the sheet. Confused by
this! Will someone help me in this? Thanks!

Private Sub CommandButton1_Click()
Dim LastRow As Object

Set LastRow = Sheet1.Range("a65536").End(xlUp)

LastRow.Offset(1, 0).Value = TextBox1.Text
LastRow.Offset(1, 1).Value = TextBox2.Text
LastRow.Offset(1, 2).Value = TextBox3.Text

MsgBox "One record written to Sheet1"

response = MsgBox("Do you want to enter another record?", _
vbYesNo)

If response = vbYes Then
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""

TextBox1.SetFocus

Else
Unload Me
End If

--
rach85
------------------------------------------------------------------------
rach85's Profile: http://www.excelforum.com/member.php...o&userid=16557
View this thread: http://www.excelforum.com/showthread...hreadid=314154


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default spreadsheet do not update

Hi Rach,
Is there any other code in any other modules? Sounds like screenupdating is
set to off.
David

"rach85" wrote:


hello all, i'm just a beginner at excel & vB so i could use some help
here. I've this code that allows me to enter some information through
a form and it should write to a row in the sheet. Even though it says
"a record has been added!", nothing appears on the sheet. Confused by
this! Will someone help me in this? Thanks!

Private Sub CommandButton1_Click()
Dim LastRow As Object

Set LastRow = Sheet1.Range("a65536").End(xlUp)

LastRow.Offset(1, 0).Value = TextBox1.Text
LastRow.Offset(1, 1).Value = TextBox2.Text
LastRow.Offset(1, 2).Value = TextBox3.Text

MsgBox "One record written to Sheet1"

response = MsgBox("Do you want to enter another record?", _
vbYesNo)

If response = vbYes Then
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""

TextBox1.SetFocus

Else
Unload Me
End If


--
rach85
------------------------------------------------------------------------
rach85's Profile: http://www.excelforum.com/member.php...o&userid=16557
View this thread: http://www.excelforum.com/showthread...hreadid=314154


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic update of spreadsheet & automatic update between workboo Losva Excel Worksheet Functions 6 September 12th 08 03:22 PM
Spreadsheet Update Richard Excel Discussion (Misc queries) 3 January 18th 08 10:14 PM
Automatically update spreadsheet from another spreadsheet Cindy Excel Worksheet Functions 3 January 9th 08 06:05 PM
Can I 'auto update' my spreadsheet ? Rich Excel Worksheet Functions 5 January 4th 07 02:41 PM
How do I set up a spreadsheet where it will automatically update? Rhoda Excel Worksheet Functions 1 May 16th 06 08:11 PM


All times are GMT +1. The time now is 08:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"