I need help writing a code

TLS49

Board Regular
Joined
Nov 26, 2019
Messages
135
Office Version
  1. 365
Platform
  1. Windows
NFL SCHEDULE.xlsb
ABCDEFGHIJKL
11NFL GAMES PICK THEM2020HOME
2GAMESROAD TEAM PICK ROAD TEAMSROAD SCORESVSHOME TEAM PICKHOME TEAMSHOME TEAM SCORES
31TEXANS0VSCHIEFS0GOT RIGHT0
42SEAHAWKS0VSFALCONS0GOT RIGHT % 
53JETS0VSBILLS0
64RAIDERS0VSPANTHERS0GOT WRONG0
75BEARS0VSLIONS0GOT WRONG% 
86COLTS0VSJAGUARS0
97PACKERS0VSVIKINGS0BYE WEEKSTEAMS
108DOLPHINS0VSPATRIOTS01
119BROWNS0VSRAVENS02
1210EAGLES0VSREDSKINS03
1311CHARGERS0VSBENGALS04
1412BUCCANEERS0VSSAINTS05
1513CARDINALS0VS49ERS06
1614COWBOYS0VSRAMS0
1715STEELERS0VSGIANTS0
1816TITANS0VSBRONCOS0
PICK THEM WEEK 1










it is highlight L10:L15 I want select B3 without select worksheet


VBA Code:
Sheets("PICK THEM WEEK 1") Range("B3").Select


Thanks You

Thomas
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
You can't select a cell on another sheet without activating that sheet.
But, in most cases you don't need to Select a cell. You could use a with statement instead.....but we would need more infor mation.
 
Upvote 0
Hello there, TLS49

There are a pair of factors that we need in order to assist you since your statement is not clear enough. However, for the little I happened to catch it seems that you would like cell B3 to get selected when you open this workbook. If that is the case and you only have this sheet on the book, let us go ahead and try the code below:

VBA Code:
Private Sub Workbook_Open()
'This will select cell B3 in the worksheet you have opened
ActiveSheet.Range("B3").Select
End Sub

If you have more than one sheet, then we will have to change this code to adapt it to the sheet activate event that you want this code to be implemented on. I certainly hope this helps and mostly this is the help you were looking for. Please forgive me if I did not get your idea that clear, but it was way to concise and details are also important to understand the problem. Cheers mate!

VBA Code:
Private Sub Worksheet_Activate()
'This will select cell B3 in the worksheet you have opened
Me.Range("B3").Select
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,123
Members
452,381
Latest member
Nova88

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