Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Chip,
I found that I also had to include the workbook object to get the desired results: Set wsht = wbk.ActiveSheet otherwise it only worked intermittently. Please see my reply to Krzysztof Naworyta in another thread in this discussion for a bit more detail. Thanks Paul "Chip Pearson" wrote in message ... Set wsht = wbk.Worksheets(strActiveWorksheet) You can simplify this to Set wsht = ActiveSheet Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group, 1998 - 2009 Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Fri, 25 Sep 2009 00:21:15 -0700, "Paul" wrote: Ok, I finally got it to work. I first tried Set wsht = wbk.Worksheets(ActiveSheet.Name) and that didn't work. So then I assigned ActiveSheet.Name to a string variable strActiveWorksheet = ActiveSheet.Name and then usd the variable in the expression Set wsht = wbk.Worksheets(strActiveWorksheet) and it worked. Thanks for providing me with the solution, Kevin. Paul |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Capture Worksheet Change Value | Excel Programming | |||
In a range of months can I capture the most current month entry? | Excel Discussion (Misc queries) | |||
Capture current WS Name? | Excel Programming | |||
Capture a worksheet in VBA | Excel Programming | |||
Capture Current Selection in a Combo Box | Excel Programming |