Screen Refresh

Giordano Bruno

Well-known Member
Joined
Jan 7, 2007
Messages
1,300
Hi Everybody,

I have some VBA code which takes the user back to the main sheet. Somehow the activecell is not indicated with the usual border when the macro finishes.

When I click on another cell, that border is shown together with one on the new active cell. I get the appearance of two active cells until I click on the first one again and then I have the appearance of no active cells.

I think the best solution is to get the screen to refresh. I can do this with Page Down, Page Up, but there must be a better way to make the screen refresh and fix itself.

Any help most gratefully received.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

zzjasonzz

Well-known Member
Joined
Apr 23, 2006
Messages
649
You could probably just add ActiveCell.Select into the code at the end or range("A1").select
 

Giordano Bruno

Well-known Member
Joined
Jan 7, 2007
Messages
1,300
Thanks zzjasonzz,

I tried that and it gives me the top border, but not the two sides and bottom.

It seems to be a bit of a bug and I just need a workaround. Maybe Page up and Page Down in the solution.
 

Forum statistics

Threads
1,181,717
Messages
5,931,651
Members
436,796
Latest member
parthibanmuniswamy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top