How do I reference a directory for a file in VBA that is different
I have been successful in writing code that allows me to print a worksheet
within my workbook and then open up a Word document and print it as well. I
basicly cut and pasted VBA from suggestions by those of you that use this
discussion group. The Word document is located on my harddrive in the same
subdirectory as my Excel workbook. This happens to be my C:\ drive. I use
this same workbook file at work where the drive is F:\. Is there a way of
referencing the document file without the directory drive so that it just
assumes that it resides in the same subdirectory as the Excel file that is
executing the macro? What I have been doing, which I know is rediculous, is
changing the VBA reference drive based on the computer that I am using. Any
help with this would be greatly appreciated. Thanks, Steve
|