View Single Post
  #19   Report Post  
sumesh56 sumesh56 is offline
Senior Member
 
Posts: 118
Default

Quote:
Originally Posted by sumesh56 View Post
thanks a lot for the pain to produce the macro for me.
As you suggested I exported your module and saved it as makedistribution.bas in another folder. I wanted to import the module into a worksheet. As you suggested VBA-insert-module-navigated to the folder where i have saved the module makedistribution.bas.Double clicked on it. i checked on the module in the worksheet.I couldnot see the module named makedistribution there. instead i saw simple name module. no code was there. you said copy the code text and paste it ino the module. I can not understand the point that,if the code is to be pasted to the module what is the use of importing the module? hope you will explain.
btw, your code worked on the ws downloaded from your direction. but i tried the macro in another worksheet. it gives me error message. it says"run-time error'1004'
method 'range' of object'global failed.
I have taken seatingplan! B2:G61 and distrib!B2:G72.the worksheet is attached for your inspection. thanks.
your macro worked in the worksheet which was downloaded from your suggestion. but it is not working in another worksheet in which i have changed only the contents and the number of tables.is it possible to edit your macro to suit any number(variable) of table of contents?