ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   frustrated with VBA select/activate and screen flips (https://www.excelbanter.com/excel-discussion-misc-queries/93697-frustrated-vba-select-activate-screen-flips.html)

William DeLeo

frustrated with VBA select/activate and screen flips
 

I'd like to execute a series of commands without pulling the various
screens worked on to the front. The user needs to see no screen flips
to the sheets referenced.

I believe I need to replace all my "activesheet." and "selection."
commands with specific sheet references ... but all I get is errors
when I try. There must be some rhyme or reason, but I am not seeing
it. Guidance please.

TIA
WD

********************************************

The following blocks of code need to be modified:

1)
Worksheets("Usage Log").Activate
With ActiveSheet.AutoFilter.Range

2)
Sheets("Usage Log").Select
Selection.AutoFilter Field:=2, Criteria1:=date_selection

3)
Worksheets("Usage Log").Activate
ActiveSheet.Cells.Select
Selection.AutoFilter

4)
Sheets("Usage Log").Select
Range("AH6:AX35").Select
Selection.ClearContents


--
William DeLeo
------------------------------------------------------------------------
William DeLeo's Profile: http://www.excelforum.com/member.php...fo&userid=1256
View this thread: http://www.excelforum.com/showthread...hreadid=551506


Bob Phillips

frustrated with VBA select/activate and screen flips
 

"William DeLeo"
wrote in message
news:William.DeLeo.29cl9p_1150214112.9469@excelfor um-nospam.com...

I'd like to execute a series of commands without pulling the various
screens worked on to the front. The user needs to see no screen flips
to the sheets referenced.

I believe I need to replace all my "activesheet." and "selection."
commands with specific sheet references ... but all I get is errors
when I try. There must be some rhyme or reason, but I am not seeing
it. Guidance please.

TIA
WD

********************************************

The following blocks of code need to be modified:

1)
Worksheets("Usage Log").Activate
With ActiveSheet.AutoFilter.Range



With Worksheets("Usage Log").AutoFilter.Range


2)
Sheets("Usage Log").Select
Selection.AutoFilter Field:=2, Criteria1:=date_selection



Sheets("Usage Log").AutoFilter Field:=2, Criteria1:=date_selection


3)
Worksheets("Usage Log").Activate
ActiveSheet.Cells.Select
Selection.AutoFilter



Worksheets("Usage Log").Cells.AutoFilter


4)
Sheets("Usage Log").Select
Range("AH6:AX35").Select
Selection.ClearContents



Sheets("Usage Log").Range("AH6:AX35").ClearContents





Don Guillett

frustrated with VBA select/activate and screen flips
 
Selections are rarely necessary or desirable. Had you recorded a macro while
doing manually you could then clean up to look something like this

1 & 2 & 3 NO selections
Worksheets("Usage Log").range("???"). _
AutoFilter Field:=2, Criteria1:=date_selection

4)'NO selections
Sheets("Usage Log").range("AH6:AX35").ClearContents

You can stop the "screen flips" by
application.screenupdating=false
your code here
application.screenupdating=true


--
Don Guillett
SalesAid Software

"William DeLeo"
wrote in message
news:William.DeLeo.29cl9p_1150214112.9469@excelfor um-nospam.com...

I'd like to execute a series of commands without pulling the various
screens worked on to the front. The user needs to see no screen flips
to the sheets referenced.

I believe I need to replace all my "activesheet." and "selection."
commands with specific sheet references ... but all I get is errors
when I try. There must be some rhyme or reason, but I am not seeing
it. Guidance please.

TIA
WD

********************************************

The following blocks of code need to be modified:

1)
Worksheets("Usage Log").Activate
With ActiveSheet.AutoFilter.Range

2)
Sheets("Usage Log").Select
Selection.AutoFilter Field:=2, Criteria1:=date_selection

3)
Worksheets("Usage Log").Activate
ActiveSheet.Cells.Select
Selection.AutoFilter

4)
Sheets("Usage Log").Select
Range("AH6:AX35").Select
Selection.ClearContents


--
William DeLeo
------------------------------------------------------------------------
William DeLeo's Profile:
http://www.excelforum.com/member.php...fo&userid=1256
View this thread: http://www.excelforum.com/showthread...hreadid=551506




William DeLeo

frustrated with VBA select/activate and screen flips
 

Thank you both so very much ... I posted the question, went to lunch
though I didn't plan to, had two (yes two) wonderful martinis to
relieve my stress with the hope that some kind soul would have offered
a solution by the time I got back ... and there it is, times two.

You guys rock! I will use the screen update thing for this application
but log the other for future reference.

Again, thank you both so much! I need to give back to this forum ... I
some times answer easy ones, but I am still very much indebted.


--
William DeLeo
------------------------------------------------------------------------
William DeLeo's Profile: http://www.excelforum.com/member.php...fo&userid=1256
View this thread: http://www.excelforum.com/showthread...hreadid=551506


Don Guillett

frustrated with VBA select/activate and screen flips
 
Hey, where's my martini? Actually, I would prefer a Turkey 101 on the rocks.

--
Don Guillett
SalesAid Software

"William DeLeo"
wrote in message
news:William.DeLeo.29cqlb_1150221002.5367@excelfor um-nospam.com...

Thank you both so very much ... I posted the question, went to lunch
though I didn't plan to, had two (yes two) wonderful martinis to
relieve my stress with the hope that some kind soul would have offered
a solution by the time I got back ... and there it is, times two.

You guys rock! I will use the screen update thing for this application
but log the other for future reference.

Again, thank you both so much! I need to give back to this forum ... I
some times answer easy ones, but I am still very much indebted.


--
William DeLeo
------------------------------------------------------------------------
William DeLeo's Profile:
http://www.excelforum.com/member.php...fo&userid=1256
View this thread: http://www.excelforum.com/showthread...hreadid=551506




William DeLeo

frustrated with VBA select/activate and screen flips
 

I'll email you one ;)


--
William DeLeo
------------------------------------------------------------------------
William DeLeo's Profile: http://www.excelforum.com/member.php...fo&userid=1256
View this thread: http://www.excelforum.com/showthread...hreadid=551506


Bob Phillips

frustrated with VBA select/activate and screen flips
 
Mine's very very dry!

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"William DeLeo"
wrote in message
news:William.DeLeo.29ctdd_1150224603.1631@excelfor um-nospam.com...

I'll email you one ;)


--
William DeLeo
------------------------------------------------------------------------
William DeLeo's Profile:

http://www.excelforum.com/member.php...fo&userid=1256
View this thread: http://www.excelforum.com/showthread...hreadid=551506




Don Guillett

frustrated with VBA select/activate and screen flips
 
OK, you get the olive

--
Don Guillett
SalesAid Software

"Bob Phillips" wrote in message
...
Mine's very very dry!

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"William DeLeo"

wrote in message
news:William.DeLeo.29ctdd_1150224603.1631@excelfor um-nospam.com...

I'll email you one ;)


--
William DeLeo
------------------------------------------------------------------------
William DeLeo's Profile:

http://www.excelforum.com/member.php...fo&userid=1256
View this thread:
http://www.excelforum.com/showthread...hreadid=551506






William DeLeo

frustrated with VBA select/activate and screen flips
 

noted for future reference :)


(thanks again guys ... things are moving along nicely for me now)


--
William DeLeo
------------------------------------------------------------------------
William DeLeo's Profile: http://www.excelforum.com/member.php...fo&userid=1256
View this thread: http://www.excelforum.com/showthread...hreadid=551506



All times are GMT +1. The time now is 02:28 PM.

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