Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi I'm developing an Excel VBA procedure and I need some support. I believe I'm doing a very basic error... WHAT AM I DOING? I'm opening an excel workbook and link it to a workbook variable type, then I'm copying a sheet to a new book and *trying* to link it to a new workbook variable type At the moment I can do this with the piece of code at the buttom, but I believe that this is not the best way to do it. WHY? Because, this procedure is causing me some troubles at the end. What happens in the last line of the code is that, besides I don't have any error, at the end of the procedure the workbook stills open in the memory and it should be deleted from the memory with the -Set ... = nothing-. Code: -------------------- Set wkInterligBook = Workbooks.Open(sFullPathToInterligFile) wkInterligBook.Sheets(sIcTID).Copy wkInterligBook.Close Set wkInterligBook = Nothing Set wkInterligBook = ActiveWorkbook wkInterligBook.SaveAs sFullPathToFinalFile (...) wkInterligBook.Save wkInterligBook.Close Set wkInterligBook = Nothing -------------------- Can someone please point me to the right direction. Many thanks. P&V -- pao_e_vinho ------------------------------------------------------------------------ pao_e_vinho's Profile: http://www.excelforum.com/member.php...o&userid=21360 View this thread: http://www.excelforum.com/showthread...hreadid=554625 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Update Cell in WKBook 1 From WkBook 2 | Excel Discussion (Misc queries) | |||
How do I make sure my Wkbook is accessible to users using earlier | Excel Discussion (Misc queries) | |||
How to link to a single wksheet in a wkbook that has comments | Excel Discussion (Misc queries) | |||
how do i create a dialog box to appear on opening an excel wkbook | Excel Discussion (Misc queries) | |||
Can changes to a worksheet be applied to all wksheets in wkbook? | Excel Worksheet Functions |