If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Function(variable)...

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-15-04, 12:36
sch-55 sch-55 is offline
Registered User
 
Join Date: Mar 2004
Posts: 2
Arrow Function(variable)...

Hello,

Just wondering if theres w different way of doing this because it doesn't work . I want to be able to specify the sheet to look at but this doesn't work... I get the error: "Runtime Error 424 - Object required"...

In VBA:
===========================================
Private Function CheckCells(sheet_name) As Worksheet

sheet_name.Range("A1")

' #####################
' (Rest of code goes around here)
' #####################
End Function

Private Function Dave()

CheckCells ("Sheet1")

' #####################
' (Rest of code goes around here)
' #####################
End Function
===========================================

Any ideas?! - I'm a bit new to this...
Reply With Quote
  #2 (permalink)  
Old 03-15-04, 17:42
sch-55 sch-55 is offline
Registered User
 
Join Date: Mar 2004
Posts: 2
Erm nm...

I figured it out...


Sheets(sheet_name).Range("A" & cell_count)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On