Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Im a GCSE student doing an advanced course in which i have to create m own magagment system of a company, i really need help with this butto i need to create, inclosed is a screentshot of my XLS and a copy of th macros already programmed by a friend, problem is the macros dont see to work so if n e body could correct it that would be great! ![]() 'Screenshot' (http://geocities.com/dumponthelawn/screenshot.PNG) Sub Button1_Click() Private Sub CommandButton1_Click() Dim iRow As Long For i = 6 To Me.Rows.Count If Me.Cells(i, 5) = "" Then Me.Cells(i, 5) = i - 5 Me.Cells(i, 6) = Me.Cells(2, 6) Me.Cells(i, 7) = Me.Cells(2, 7) Me.Cells(i, 8) = Me.Cells(2, 8) Me.Cells(i, 9) = Me.Cells(2, 9) Me.Cells(i, 10) = Me.Cells(2, 10) End If Next i End Sub -- WindJacka ----------------------------------------------------------------------- WindJackal's Profile: http://www.excelforum.com/member.php...fo&userid=1456 View this thread: http://www.excelforum.com/showthread.php?threadid=26196 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Remove the line:
Sub Button1_Click() So it should just look like this: Private Sub CommandButton1_Click() Dim iRow As Long For i = 6 To Me.Rows.Count If Me.Cells(i, 5) = "" Then Me.Cells(i, 5) = i - 5 Me.Cells(i, 6) = Me.Cells(2, 6) Me.Cells(i, 7) = Me.Cells(2, 7) Me.Cells(i, 8) = Me.Cells(2, 8) Me.Cells(i, 9) = Me.Cells(2, 9) Me.Cells(i, 10) = Me.Cells(2, 10) End If Next i End Sub -- Regards, Tom Ogilvy "WindJackal" wrote in message ... Im a GCSE student doing an advanced course in which i have to create my own magagment system of a company, i really need help with this button i need to create, inclosed is a screentshot of my XLS and a copy of the macros already programmed by a friend, problem is the macros dont seem to work so if n e body could correct it that would be great! ![]() 'Screenshot' (http://geocities.com/dumponthelawn/screenshot.PNG) Sub Button1_Click() Private Sub CommandButton1_Click() Dim iRow As Long For i = 6 To Me.Rows.Count If Me.Cells(i, 5) = "" Then Me.Cells(i, 5) = i - 5 Me.Cells(i, 6) = Me.Cells(2, 6) Me.Cells(i, 7) = Me.Cells(2, 7) Me.Cells(i, 8) = Me.Cells(2, 8) Me.Cells(i, 9) = Me.Cells(2, 9) Me.Cells(i, 10) = Me.Cells(2, 10) End If Next i End Sub -- WindJackal ------------------------------------------------------------------------ WindJackal's Profile: http://www.excelforum.com/member.php...o&userid=14569 View this thread: http://www.excelforum.com/showthread...hreadid=261966 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
X marks the spot | Excel Discussion (Misc queries) | |||
Hosur an IT hot spot? | Excel Worksheet Functions | |||
Trouble with formula on Student 2006 learning essentials template | Excel Worksheet Functions | |||
I want a name in one spot and it's code in another | Excel Discussion (Misc queries) | |||
Showing SeriesCollecion as a Spot with value | Excel Programming |