Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default The missing link


I have a workbook that will have lots of worksheets in it. I want to b
able to use one worksheet from the workbook to be able to updat
columns and rows of the other worksheets in the workbook.

I have created a macro in the master/main worksheet that will open
userform that will allow me to insert a clients name into it an the
that macro will place the clients name onto the spreadsheet and creat
a new worksheet with that clients name on it.

I want to be able to do two things:

Part I
I want the information that is in 'row 11' of the main/master pag
copied over to the worksheet with the username on it. So everytime
add some info to 'row 11' on the main/master worksheet that info wil
automatically be added to the worksheet with the usersname on it. B
the way the worksheet with the usersname is being created by the cop
of another worksheet and is simply being renamed.

Part II
I think this is going to be the tricky part. I want all of th
information from the 'row' on the main/master worksheet that has clien
name on it be added to the worksheet that has the same name as th
client. So if I have:
Jackson, Charles on row 15 of my main/master worksheet and a workshee
with the name Jackson, Charles I want to be able to type in the numbe
7 on the main/master worksheet on the same row as the nam
Jackson,Charles and have the number 7 appear on the worksheet with th
name Jackson, Charles.

with this code completed I would like for the spreadsheets to loo
something like this:

main/master
'row 11' nails apples blue things
night sun
Jackson, Charles 7 8 10 14
20 1

worksheet named Jackson, Charles
Nails 7
apples 8
blue 10
things 14
night 20
sun 1

This is the code I am using on the main/master to copy and create th
user worksheet

Code
-------------------

Private Sub cmdAdd_Click()
Dim iRow As Long
Dim ws As Worksheet
Dim newSheetName As String
Set ws = Worksheets("CGS")

'find first empty row in database
iRow = ws.Cells(Rows.Count, 1) _
.End(xlUp).Offset(1, 0).Row

'check for a part number
If Trim(Me.LstNm.Value) = "" Then
Me.LstNm.SetFocus
MsgBox "Please enter last name"
Exit Sub
End If

'copy the data to the database
ws.Cells(iRow, 1).Value = Me.LstNm.Value
ws.Cells(iRow, 2).Value = Me.FrstNm.Value
newSheetName = ws.Cells(iRow, 1) & "," & ws.Cells(iRow, 2)

'clear the data
Me.LstNm.Value = ""
Me.FrstNm.Value = ""
Me.LstNm.SetFocus

For Each ws In Worksheets
If ws.Name = newSheetName Or _
newSheetName = "" Or _
IsNumeric(newSheetName) Then
MsgBox "Sheet already exists or name is invalid", vbInformation
Exit Sub
End If

Next
Sheets("SS").Copy befo=Sheets(1)
Sheets(1).Name = newSheetName
Sheets(newSheetName).Move After:=Sheets(Sheets.Count)

'close userform
Unload Me
End Sub

-------------------


I know that I have used alot of words but I know (think I know, but
know that I dont know) the code needed to do this is no that difficul
for someone versed in vba coding which I am not.

thanx

--
oberon.blac
-----------------------------------------------------------------------
oberon.black's Profile: http://www.excelforum.com/member.php...fo&userid=2673
View this thread: http://www.excelforum.com/showthread.php?threadid=46645

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
THE MISSING LINK.. Nastech Excel Discussion (Misc queries) 1 November 15th 08 12:26 AM
Link is missing Aaron Dyck Excel Worksheet Functions 1 August 24th 07 09:28 PM
vlookup missing link Enrique Excel Discussion (Misc queries) 2 January 30th 07 06:17 PM
In Excel 2003, under the File menu the Permission link is missing dlrvh1984 Excel Worksheet Functions 2 September 21st 05 03:56 PM
missing link pabs[_8_] Excel Programming 2 January 2nd 04 08:35 PM


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