Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default GCSE Student in a spot of trouble


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default GCSE Student in a spot of trouble

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
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
X marks the spot BlueFeather Excel Discussion (Misc queries) 2 December 11th 08 11:18 AM
Hosur an IT hot spot? [email protected] Excel Worksheet Functions 0 October 17th 07 03:47 PM
Trouble with formula on Student 2006 learning essentials template Student in BC Excel Worksheet Functions 1 December 27th 05 07:05 AM
I want a name in one spot and it's code in another TwoWheelDemon Excel Discussion (Misc queries) 1 March 17th 05 04:31 PM
Showing SeriesCollecion as a Spot with value Sugith Kumar Excel Programming 4 September 22nd 03 03:43 PM


All times are GMT +1. The time now is 12:59 AM.

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"