Jan 21, 2004 #1 AmritPaulSingh Programmer Joined Dec 5, 2002 Messages 46 Location CA If the VBA code has a very long line, how do i break it in 2 or more lines. I know there is something to do with & _ but am not able to use it. Thanks
If the VBA code has a very long line, how do i break it in 2 or more lines. I know there is something to do with & _ but am not able to use it. Thanks
Jan 21, 2004 1 #2 dyarwood Programmer Joined Nov 3, 2003 Messages 1,483 Location GB The thing you are loking for is _ space then _ then just keep typing on the next line Upvote 0 Downvote
Jan 21, 2004 Thread starter #3 AmritPaulSingh Programmer Joined Dec 5, 2002 Messages 46 Location CA Thanks dyarwood. Upvote 0 Downvote
Jan 21, 2004 #4 nicsin Programmer Joined Jul 31, 2003 Messages 743 Location GB if you just want to insert a line then you should use Code: _ . If you are also concatenating strings etc then use Code: & _ (notice the sapce in between). Code: public function myFun(param1 as string _ param2 as integer) as String Dim result as String result = param1 & _ param2 myFun = result end function Upvote 0 Downvote
if you just want to insert a line then you should use Code: _ . If you are also concatenating strings etc then use Code: & _ (notice the sapce in between). Code: public function myFun(param1 as string _ param2 as integer) as String Dim result as String result = param1 & _ param2 myFun = result end function
Jan 22, 2004 Thread starter #5 AmritPaulSingh Programmer Joined Dec 5, 2002 Messages 46 Location CA got it. thanks nicsin Upvote 0 Downvote