Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how do you add a row of data like in a database

I am trying to add a row of data at the bottom of a named table using a
userform and VBA code.

I was unable to do this and it's driving me round the u bend!

PLEASE can any one help me before i go mad:(


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how do you add a row of data like in a database

nextRow = ActiveSheet.UsedRange.Row + _
ActiveSheet.UsedRange.Rows.Count
ActiveSheet.Cells(nextRow, 1).Value = NewColumn1Value
ActiveSheet.Cells(nextRow, 2).Value = NewColumn2Value

Does this answer your question? - Pikus


---
Message posted from http://www.ExcelForum.com/

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how do you add a row of data like in a database

THANKS FOR THE CODE

but how do i add data from a text box on a userform to the end of
table.

~AS in you type in data in a form that pops up(Userform1)
~You click a button(called Add record)
~New data is added to the end of the tabl

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default how do you add a row of data like in a database

Hi

I am using

Sheets("Data").Select
Sheets("Data").Range("A65536").End(xlUp).Offset(1, 0).Range("A1").Activate

to locate the next empty row then

LogEntry.TextBox1.Text = ActiveCell.Offset(0, 1).Value
LogEntry.ComboBox1.Value = ActiveCell.Offset(0, 3).Value
LogEntry.ComboBox2.Value = ActiveCell.Offset(0, 4).Value
LogEntry.ComboBox3.Value = ActiveCell.Offset(0, 5).Value
LogEntry.ComboBox4.Value = ActiveCell.Offset(0, 6).Value
LogEntry.ComboBox5.Value = ActiveCell.Offset(0, 7).Value
LogEntry.ComboBox6.Value = ActiveCell.Offset(0, 8).Value
LogEntry.ComboBox7.Value = ActiveCell.Offset(0, 9).Value
LogEntry.TextBox3.Text = ActiveCell.Offset(0, 10).Value
LogEntry.TextBox4.Text = ActiveCell.Offset(0, 11).Value
LogEntry.TextBox5.Text = ActiveCell.Offset(0, 12).Value
LogEntry.TextBox7.Text = ActiveCell.Offset(0, 14).Value

where LogEntry is the name of the userform

HTH

Kenny

"mabz " wrote in message
...
THANKS FOR THE CODE

but how do i add data from a text box on a userform to the end of a
table.

~AS in you type in data in a form that pops up(Userform1)
~You click a button(called Add record)
~New data is added to the end of the table


---
Message posted from http://www.ExcelForum.com/



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how do you add a row of data like in a database

Thank you sooo much!!!!!!!!!!!!!!!!!!!

Now I can create colourful foems to impress every on

--
Message posted from http://www.ExcelForum.com

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
Update Excel Database via Access Main Database with a script Finnbar New Users to Excel 2 November 3rd 08 07:24 PM
Tool bar: Data/Import external data/New database query Daniel Setting up and Configuration of Excel 3 February 28th 08 08:40 AM
Extract data from database Montu Excel Worksheet Functions 8 February 19th 08 01:55 PM
database query not showing foxpro database How I import data mangat New Users to Excel 1 June 24th 07 03:31 PM
Using Sum for database data jnorton Excel Discussion (Misc queries) 3 August 11th 05 10:08 AM


All times are GMT +1. The time now is 11:02 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"