|
-
Feb 27th, 2007, 04:12 PM
#2
Re: Can't Close Excel Aplication (Range Issue)
Get rid of those ActiveWorkbooks and ActiveSheets - they only apply when you specifically want to use the active book/sheet. Replace them with specific directions as to what object you are using, eg. oWB to use the workbook, osH to use that specific sheet, oWB.worksheets(1) etc.
Also, get rid of the Selections and refer directly to the range. Why select a range and then do something to the current selection if you already know what the Range is? Just do it to the Range itself!
This is the one issue with using VBA macros to record your VBA - Excel interprets your actions using the ActiveBook / Sheet and the Selection object because that is what you are using; however for generic coding purposes it will not do.
zaza
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|