![]() |
Include external file .BAS in Excel VBA
Can i load external .BAS file, with some kind of include or import? I use this way to get control over the code. Tks in Advance! Rafael Porche -- locoloc ----------------------------------------------------------------------- locoloco's Profile: http://www.excelforum.com/member.php...fo&userid=1551 View this thread: http://www.excelforum.com/showthread.php?threadid=27084 |
Include external file .BAS in Excel VBA
In VB editor you can right click on the project and select Import File. This allows you to get a .bas into your project. It should work as lon as none of the code uses commands not included with VBA (i.e. VB onl commands). Not sure whether the module is saved again with the spreadsheet o whether it stays where you found it though. Probably with th spreadsheet, but you should check. -- kkkni ----------------------------------------------------------------------- kkknie's Profile: http://www.excelforum.com/member.php...nfo&userid=754 View this thread: http://www.excelforum.com/showthread.php?threadid=27084 |
Include external file .BAS in Excel VBA
Sub AddCode()
ThisWorkbook.VBProject.VBComponents.Import _ FileName:="Y:\Docs\bovey\modAPIPlaySoundA.bas" End Sub -- Regards, Tom Ogilvy "locoloco" wrote in message ... Can i load external .BAS file, with some kind of include or import? I use this way to get control over the code. Tks in Advance! Rafael Porcher -- locoloco ------------------------------------------------------------------------ locoloco's Profile: http://www.excelforum.com/member.php...o&userid=15511 View this thread: http://www.excelforum.com/showthread...hreadid=270842 |
All times are GMT +1. The time now is 03:11 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com