I have a formula in a macro to work with worksheets that are named
differently. The formula requires that the name of the worksheet be placed
(i.e. quot;Wheatonquot;) in the code.
Set ws = wb.Worksheets(quot;Wheatonquot;)
If I want this macro to work with the active worksheet how would I designate
it as the active worksheet.
Set ws = wb.ActiveworkSheet ?
Thanks for your help,
cinvic
set ws = wb.activesheet
cinvic wrote:
gt;
gt; I have a formula in a macro to work with worksheets that are named
gt; differently. The formula requires that the name of the worksheet be placed
gt; (i.e. quot;Wheatonquot;) in the code.
gt;
gt; Set ws = wb.Worksheets(quot;Wheatonquot;)
gt;
gt; If I want this macro to work with the active worksheet how would I designate
gt; it as the active worksheet.
gt;
gt; Set ws = wb.ActiveworkSheet ?
gt;
gt; Thanks for your help,
gt; cinvic
--
Dave Peterson
Hey Mr. Peterson! Hope you're doing ok. Thanks again for you help.
quot;Dave Petersonquot; wrote:
gt; set ws = wb.activesheet
gt;
gt;
gt;
gt; cinvic wrote:
gt; gt;
gt; gt; I have a formula in a macro to work with worksheets that are named
gt; gt; differently. The formula requires that the name of the worksheet be placed
gt; gt; (i.e. quot;Wheatonquot;) in the code.
gt; gt;
gt; gt; Set ws = wb.Worksheets(quot;Wheatonquot;)
gt; gt;
gt; gt; If I want this macro to work with the active worksheet how would I designate
gt; gt; it as the active worksheet.
gt; gt;
gt; gt; Set ws = wb.ActiveworkSheet ?
gt; gt;
gt; gt; Thanks for your help,
gt; gt; cinvic
gt;
gt; --
gt;
gt; Dave Peterson
gt;
- Jan 24 Wed 2007 20:35
Macros and worksheets
close
全站熱搜
留言列表
發表留言