Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, I got the following code for inserting lines into my program: Sub ImportModuleCode(ByVal wb As Workbook, _ ByVal ModuleName As String, ByVal ImportFromFile As String) ' imports code to ModuleName in wb from a textfile name ImportFromFile Dim VBCM As CodeModule If Dir(ImportFromFile) = "" Then Exit Sub On Error Resume Next Set VBCM = wb.VBProject.VBComponents(ModuleName).CodeModule If Not VBCM Is Nothing Then VBCM.AddFromFile ImportFromFile Set VBCM = Nothing End If On Error GoTo 0 End Sub The problem is that it inserts the code from the file in the positio that the cursor was set at. How can I a) change the cursor position or b) make it insert the tex from the file in the lines that I want -- ehnt ----------------------------------------------------------------------- ehntd's Profile: http://www.excelforum.com/member.php...fo&userid=1586 View this thread: http://www.excelforum.com/showthread.php?threadid=27446 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cursor position? | Excel Discussion (Misc queries) | |||
cursor position | Excel Programming | |||
cursor position | Excel Programming | |||
Position Cursor to A1 | Excel Programming | |||
cursor position | Excel Programming |