ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Capture current WS Name? (https://www.excelbanter.com/excel-programming/388941-capture-current-ws-name.html)

Dave Birley

Capture current WS Name?
 
I want to run a Macro that starts in "the current" WS, briefly jumps to a
different WS (always the same one) Grabs the Format of a particular Column,
and returns to do a Paste Special. I need to be able to capture the Name of
the current WS into a Variable at the top of the Macro, so that I can return
to the correct WS to continue.

Help, please!
--
Dave
Temping with Staffmark
in Rock Hill, SC

merjet

Capture current WS Name?
 
Activesheet.Name

Merjet



Don Guillett

Capture current WS Name?
 


Why bother to waste time and effort by going there.

Sub copysh8colhformat()
Sheets("sheet6").Columns("H").Copy
Columns(ActiveCell.Column).PasteSpecial Paste:=xlPasteFormats
End Sub

--
Don Guillett
SalesAid Software

"Dave Birley" wrote in message
...
I want to run a Macro that starts in "the current" WS, briefly jumps to a
different WS (always the same one) Grabs the Format of a particular
Column,
and returns to do a Paste Special. I need to be able to capture the Name
of
the current WS into a Variable at the top of the Macro, so that I can
return
to the correct WS to continue.

Help, please!
--
Dave
Temping with Staffmark
in Rock Hill, SC



Dave Birley

Capture current WS Name?
 
Thanks to both of you -- now I have the direct answer to my question, should
I ever need to use it in some other context, and your solution which is
application specific, and slicker 'n a pig in poop <g!
--
Dave
Temping with Staffmark
in Rock Hill, SC


"Don Guillett" wrote:



Why bother to waste time and effort by going there.

Sub copysh8colhformat()
Sheets("sheet6").Columns("H").Copy
Columns(ActiveCell.Column).PasteSpecial Paste:=xlPasteFormats
End Sub

--
Don Guillett
SalesAid Software

"Dave Birley" wrote in message
...
I want to run a Macro that starts in "the current" WS, briefly jumps to a
different WS (always the same one) Grabs the Format of a particular
Column,
and returns to do a Paste Special. I need to be able to capture the Name
of
the current WS into a Variable at the top of the Macro, so that I can
return
to the correct WS to continue.

Help, please!
--
Dave
Temping with Staffmark
in Rock Hill, SC




Don Guillett

Capture current WS Name?
 
I might have preferred a cleaner kudo. You're not a Texas Aggie, by chance.
<G
slicker 'n a pig in poop


--
Don Guillett
SalesAid Software

"Dave Birley" wrote in message
...
Thanks to both of you -- now I have the direct answer to my question,
should
I ever need to use it in some other context, and your solution which is
application specific, and slicker 'n a pig in poop <g!
--
Dave
Temping with Staffmark
in Rock Hill, SC


"Don Guillett" wrote:



Why bother to waste time and effort by going there.

Sub copysh8colhformat()
Sheets("sheet6").Columns("H").Copy
Columns(ActiveCell.Column).PasteSpecial Paste:=xlPasteFormats
End Sub

--
Don Guillett
SalesAid Software

"Dave Birley" wrote in message
...
I want to run a Macro that starts in "the current" WS, briefly jumps to
a
different WS (always the same one) Grabs the Format of a particular
Column,
and returns to do a Paste Special. I need to be able to capture the
Name
of
the current WS into a Variable at the top of the Macro, so that I can
return
to the correct WS to continue.

Help, please!
--
Dave
Temping with Staffmark
in Rock Hill, SC





Dave Birley

Capture current WS Name?
 
No, actually -- Canadian by birth, British by heritage, and South Carolinian
by the Grace of God <g!
--
Dave
Temping with Staffmark
in Rock Hill, SC


"Don Guillett" wrote:

I might have preferred a cleaner kudo. You're not a Texas Aggie, by chance.
<G
slicker 'n a pig in poop


--
Don Guillett
SalesAid Software

"Dave Birley" wrote in message
...
Thanks to both of you -- now I have the direct answer to my question,
should
I ever need to use it in some other context, and your solution which is
application specific, and slicker 'n a pig in poop <g!
--
Dave
Temping with Staffmark
in Rock Hill, SC


"Don Guillett" wrote:



Why bother to waste time and effort by going there.

Sub copysh8colhformat()
Sheets("sheet6").Columns("H").Copy
Columns(ActiveCell.Column).PasteSpecial Paste:=xlPasteFormats
End Sub

--
Don Guillett
SalesAid Software

"Dave Birley" wrote in message
...
I want to run a Macro that starts in "the current" WS, briefly jumps to
a
different WS (always the same one) Grabs the Format of a particular
Column,
and returns to do a Paste Special. I need to be able to capture the
Name
of
the current WS into a Variable at the top of the Macro, so that I can
return
to the correct WS to continue.

Help, please!
--
Dave
Temping with Staffmark
in Rock Hill, SC






All times are GMT +1. The time now is 05:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com