Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Adding to a named range on another worksheet

I hope I can relay my problem cleary

I have 2 worksheets, the first sheet is a form where the user answers a few questions and inputs a lot of data. It looks something like this
104-89-78 MARTIN 02/04/2004 02/01/2004 DEBORA
07-55-20 LEWI
111-21-56 HAMPTO

Etc..

Where I am having problems is having the data stored on the "Database" worksheet. I need to keep the focus on the FORM and not be jumping back and forth between the sheets. The "Database" worksheet will have several ranges, each range being named for the day the data is input. ex: Feb_02_200

I can create the range name and save the first row of data but after that I am at a loss. Every time I save the data, it overwrites the previous row, never moving down to the next empty row and updating the range

I hope you can understand this

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Adding to a named range on another worksheet

"Troy" wrote in message ...
I hope I can relay my problem cleary.

I have 2 worksheets, the first sheet is a form where the user answers a few questions and inputs a lot of data. It looks something like this:
104-89-78 MARTIN 02/04/2004 02/01/2004 DEBORAH
07-55-20 LEWIS
111-21-56 HAMPTON

Etc...

Where I am having problems is having the data stored on the "Database" worksheet. I need to keep the focus on the FORM and not be jumping back and forth between the sheets. The "Database" worksheet will have several ranges, each range being named for the day the data is input. ex: Feb_02_2004

I can create the range name and save the first row of data but after that I am at a loss. Every time I save the data, it overwrites the previous row, never moving down to the next empty row and updating the range.

I hope you can understand this.

Thanks.


Troy, not sure if you mean the form is the worksheet. Or you have a
userform displayed?
If it's a userform the code below may help you.

Private Sub cbadd_Click()
Application.ScreenUpdating = False '''This stops the jumping action
Dim custrange As Range
Dim a As Integer
Set custrange = Worksheets("CustData").Cells(2, 1).CurrentRegion
For a = 1 To custrange.Rows.Count''this will count to the first empty
cell
Next a
With customerdata''This is my userform name
custrange(a, 1).Value = UCase(.tblast.Text)
custrange(a, 2).Value = UCase(.tbfirst.Text)
custrange(a, 3).Value = .tbphone.Text
custrange(a, 4).Value = UCase(.tbstreet.Text)
custrange(a, 5).Value = UCase(.tbcity.Text)
custrange(a, 6).Value = UCase(.tbstate.Text)
custrange(a, 7).Value = .tbzip.Text
custrange(a, 8).Value = .tbstartdate.Text
custrange(a, 10).Value = .tbjob.Text
End With
End Sub



As they say "HTH"

Charles, who likes working with Excel and Learning more everyday.
Thanks to all
who share their knowledge.
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
Subtotals from Named Range on other worksheet sgodschalk Excel Worksheet Functions 5 June 11th 09 08:51 PM
Do not specify worksheet in a named range hmm Excel Discussion (Misc queries) 3 September 18th 07 01:30 PM
Getting a named range to appear in another worksheet John Excel Discussion (Misc queries) 2 July 28th 07 02:12 AM
named range not specific to worksheet Mark Kubicki Excel Programming 1 November 26th 03 04:39 PM
need help adding named range as new series to a graph Keith R[_3_] Excel Programming 1 October 24th 03 09:29 PM


All times are GMT +1. The time now is 10:37 PM.

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

About Us

"It's about Microsoft Excel"