General information
Category:
Coding, syntax & commands
Title:
Adding a macro to a module in Excel
How can I add a sub to a particular module in excel?
1. I have a spreadsheet with 6 module that is
oE = GETOBJECT(,'excel.application')
oe.modules.Count = 6
2. If I try to do add a sub to module 1, I get an error, unknown name
oe.modules[1].Add.InsertFile("tt.txt")
3. Adding the sub, without specifying a module number, results in creating an additional
module each time
oe.modules.Add.InsertFile("tt.txt")
Thanks
Steve
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only