LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default procedure/function calling

hi
i am repeatedly using some stmts in the if like

If (StrComp(s,a) = 0 Then
Range("a" & j).Value = Sheets("sheet2").Range("a" & z).Value
Range("b" & j).Value = Sheets("sheet2").Range("h" & z).Value
end if
If (StrComp(s,b)= 0 Then
Range("a" & j).Value = Sheets("sheet2").Range("a" & z).Value
Range("b" & j).Value = Sheets("sheet2").Range("h" & z).Value
end if

here, i m often using the stmts(in red) often .
so can somebody help me how to use the procedures for (reusablitiy)
i want to pass the values j and z as arguments to the called procedure

 
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
Calling sub procedure Yossi[_2_] Excel Programming 2 August 21st 05 02:01 PM
Calling a procedure in a procedure Norman Jones Excel Programming 8 August 20th 04 07:53 PM
Calling a procedure in a procedure N10 Excel Programming 2 August 18th 04 12:49 AM
Calling a procedure in a procedure Don Guillett[_4_] Excel Programming 1 August 17th 04 11:31 PM
Calling a Custom Function within a Procedure [email protected] Excel Programming 1 November 16th 03 03:51 AM


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