i am trying to specify the column Names which is to be locked
![]()
Please Login or Register to view this content.
i am trying to specify the column Names which is to be locked
![]()
Please Login or Register to view this content.
Looks like IntersectColumnRows is a subroutine or function. Do you have the code for IntersectColumnRows?
If not, that's likely to be your problem.
Regards, TMS
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
yes
![]()
Please Login or Register to view this content.
Ok, try it with the parameters in brackets
![]()
Please Login or Register to view this content.
Regards, TMS
now i am getting another errror called
Argument not optional
![]()
Please Login or Register to view this content.
Last edited by baig123; 01-03-2015 at 05:14 AM. Reason: paragraph
Seems fair enough. The subroutine expects three ranges as well as the other parameters.
Regards, TMS
i used to give like this
![]()
Please Login or Register to view this content.
In post #7, you have specified 9 parameter to the function which actually can take up to only 7 according to #
Try reconsidering this with Brackets as Sir TMS has suggested.
Regards,
Vikas Gautam
Excel-buzz.blogspot.com
Excel is not a matter of Experience, its a matter of Application.
Say Thanks, Click * Add Reputation
Hi, Vikas,
2 parameters for the column names are expected, and none of the threee ranges are delivered from baig123 when passing parameters. Please explain how any routine should work with brackets as I wonder how that could be.
Ciao,
Holger
Use Code-Tags for showing your code: [code] Your Code here [/code]
Please mark your question Solved if there has been offered a solution that works fine for you
without using IntersectColumnRows function can i used just sub
Sorry Holger,
I didn't understand your question as my english is not that good as yours.
As far as the brackets are concerned, (I don't know much of programming vocabulary)
but practically, using x = Mysum Arg1, Arg2 give error but x = mysum (Arg1, Arg2) doesn't.
If you know anything else then please share so that we can learn more of it.
Hi, Bikas,
baig is using some code found anywhere on the net (to be more specific at stackoverflow) which should be the solution to the problem.
The variable response is used for holding the return of a value of the sub procedure - but which one as no parameter is used for exchange if Iīm reading the code correctly. Normally this would be done to capture the return value from a function but no function and no return value here. As Trevor pointed out the parameters in this particular case should be provided within brackets, and all of them at the proper places or with the proper responding). Sadly baig choose to have his own way of filling the parameters and realizing that it wonīt work not worry about his failure but ask for help without providing the essential Sub.
Counting the number of parameters may be one way to guess that the information between the calling sub and the one information is being passed to isnīt correct, looking at the parameters and finding only strings where 3 Ranges are due to be passed would be a better ides.
Last: who says that baig has a table in the sheet? Thatīs what the code is assuming, and I have to assume this as well as somebody who doesnīt know what parameters need to be passed has picked this code for him to work.
Ciao,
Holger
HaHoBe: I think you are right. It is a subroutine, not a function. It would need to be a function to return a value.
I've just been stepping through the issues. Is there code for the routine being called? Yes. If you are passing a result to a variable, the parameters need to be within brackets. Different error: give the routine all the parameters it is expecting.
I must admit to not looking that far ahead. Bit early in the year, maybe? A quick glance at the code told me I didn't know what it was doing so I didn't spend a lot of time on it. Maybe missed the obvious.
Regards, TMS
hi Holger,
Thanks for the nice explanation.
That Sub vs Function thing taught a lesson.
Yes, I just counted the Parameters, and didn't consider their type.
Thanks again.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks