![]() |
Sheet Code Module: copying code to
I would like to import a Worksheet_SelectionChange sub into the Sheet
Code Module behind a particular sheet. I can import it into a separate Class Module, but have been unable to figure out how to direct it into the Code Module behind the specific sheet it relates to. Any suggestions? There's not a lot of code (23 lines, 143 columns), so I guess I could string it all together as a CreateEventProc but I couldn't help feeling I must be missing something going that way Matthew |
Sheet Code Module: copying code to
Matthew,
You can't import it as a class module, because that class module will already exist. You will have to build it up as you say. -- HTH RP (remove nothere from the email address if mailing direct) wrote in message oups.com... I would like to import a Worksheet_SelectionChange sub into the Sheet Code Module behind a particular sheet. I can import it into a separate Class Module, but have been unable to figure out how to direct it into the Code Module behind the specific sheet it relates to. Any suggestions? There's not a lot of code (23 lines, 143 columns), so I guess I could string it all together as a CreateEventProc but I couldn't help feeling I must be missing something going that way Matthew |
Sheet Code Module: copying code to
This may not apply, but if you're creating that worksheet, you could use a
template that contains the code. Kind of: Dim newwks As Worksheet Set newwks = Sheets.Add(After:=Sheets(Sheets.Count), _ Type:="C:\WINDOWS\Application Data\Microsoft\Excel\XLSTART\sheet.xlt") Or maybe just have a hidden worksheet in the workbook that has the code already there. " wrote: I would like to import a Worksheet_SelectionChange sub into the Sheet Code Module behind a particular sheet. I can import it into a separate Class Module, but have been unable to figure out how to direct it into the Code Module behind the specific sheet it relates to. Any suggestions? There's not a lot of code (23 lines, 143 columns), so I guess I could string it all together as a CreateEventProc but I couldn't help feeling I must be missing something going that way Matthew -- Dave Peterson |
All times are GMT +1. The time now is 08:42 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com