Show Whole Sheet, Edit Cell B2

vba_newby

Board Regular
Joined
May 2, 2008
Messages
71
Hello All

I have a command button and on click i am
1. clearing some cells
2. going to the top of the work sheet - Ctrl + Home basically
3. go to cell B2

My code is

Worksheets("Sheet1").Range("B2:B12").ClearContents
Application.Goto Range("A1")
Application.Goto Worksheets("Sheet1").Range("B2"), True

Now... my cells do clear fine
I end up on cell B2 but the whole sheet is not showing... only column B starting with cell B2. And... i can not edit cell B2... i want to be able to start typing. I can hit the enter key and go to different cells, but i can not use the arrow keys to move to cells or type any text. What is going on with this?

Thanks...
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Modify how you're handling the last line:

Code:
Sub MoveAround()
    Worksheets("Sheet1").Range("B2:B12").ClearContents
    Application.Goto Range("A1")
    Worksheets("Sheet1").Range("B2").Select
End Sub
 
Upvote 0
I have modified this several times and many different ways with no success... what am i missing...



Modify how you're handling the last line:

Code:
Sub MoveAround()
    Worksheets("Sheet1").Range("B2:B12").ClearContents
    Application.Goto Range("A1")
    Worksheets("Sheet1").Range("B2").Select
End Sub
 
Upvote 0
You're missing the changes I made to your last line of code. :) Replace it with what I put in to mine. ;) That's at least what I understood you wanted to do, if that's not, could you elaborate more on your expected outcome?
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,728
Members
452,939
Latest member
WCrawford

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
Back
Top