View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Steve Steve is offline
external usenet poster
 
Posts: 1,814
Default Creating functions

Hi,

I have written the following code in a module: (essentially all it does is
find the next blank line for me to use)

Public Function SR()

Dim row, col As Integer

col = 4
row = 7

While Worksheets("Main").Cells(row, col).Value < ""
row = row + 1
Wend

End Function

Can someone please tell me:

- is this the right place to put it (it does seem to work)
- how I return the value back to my calling private sub (Button click)

Cheer

Steve