Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with Macros
Hey all,
I was hoping that somebody out there may be able to help me with some macro issues and questions. First off, I have this line in a macro I have made: Worksheets("Claim Label Template").PageSetup.PrintArea = "$A$1:$I$26" this works well, but the problem is in another macro whereby there is to be variable amount of lines. I have a variable that always knows how many lines in the sheet there are, and the columns are a constant. Problems is I aways get a run time error 1004 attempting to make this statement variable. I have tries using range cells, but all with the same error. Is there a smiple code liek the one I have mentioned that will take, say R for rows, and allow me to set the print area to the number of rows up to column d? Beside this, I am curious to know if it is possible to do the follwoing: At work, we have Adobe Acrobat installed. We have a task ahead whereby we will need to get several pdf files and join them into one file. This task needs repeating many times for different files. I can select on the files and right click to get the option to join the files then acrobat launches in and joins them, then I have to save them. Is it possible to write an macro in excel to read file names, say along each row and somehow have excel (through the macro) run acrobat, joining these files together, then saving the result in a directory that will change name for each conglomeration? Any help is very much appreciated! Regards, Clint |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with Macros
Clinton M James Wrote: Hey all, I was hoping that somebody out there may be able to help me with some macro issues and questions. First off, I have this line in a macro I have made: Worksheets("Claim Label Template").PageSetup.PrintArea = "$A$1:$I$26" this works well, but the problem is in another macro whereby there is to be variable amount of lines. I have a variable that always knows how many lines in the sheet there are, and the columns are a constant. Problems is I aways get a run time error 1004 attempting to make this statement variable. I have tries using range cells, but all with the same error. Is there a smiple code liek the one I have mentioned that will take, say R for rows, and allow me to set the area to the number of rows up to column d? Beside this, I am curious to know if it is possible to do the follwoing: At work, we have Adobe Acrobat installed. We have a task ahead whereby we will need to get several pdf files and join them into one file. This task needs repeating many times for different files. I can select on the files and right click to get the option to join the files then acrobat launches in and joins them, then I have to save them. Is it possible to write an macro in excel to read file names, say along each row and somehow have excel (through the macro) run acrobat, joining these files together, then saving the result in a directory that will change name for each conglomeration? Any help is very much appreciated! Regards, Clint I perhaps can suggest solution for the first part. You said that number of lines can vary and the number is given by variable R then you can concatenate the string for page setup. Your could write R = 26 ' variable which has line count abc = "$A$1:$I$" abcd = abc & R Worksheets("Sheet1").PageSetup.PrintArea = abcd A V Veerkar -- avveerkar ------------------------------------------------------------------------ avveerkar's Profile: http://www.excelforum.com/member.php...o&userid=30338 View this thread: http://www.excelforum.com/showthread...hreadid=508913 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
weird saving of a document with macros resulting with macros being transfered to the copy | Excel Programming | |||
convert lotus 123w macros to excel macros | Excel Programming | |||
convert lotus 123w macros to excel macros | Excel Programming | |||
Open workbook-macros enabled, opening another with macros | Excel Programming | |||
Macros not appearing in the Tools Macro Macros list | Excel Programming |