this code not working

bhandari

Active Member
Joined
Oct 17, 2017
Messages
359
iam in learning stage can anyone help me out y this code not working

Sub notworking()


ThisWorkbook.Worksheets(1).Range("A1:B10").cells (9)
End Sub
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
What are you trying to do?

Cells is used to return a range.
This is A1 (cells(Row num,Column num)
Code:
Cells(1,1)
 
Last edited:
Upvote 0
Sub notworking()


ThisWorkbook.Worksheets(1).cells(9, 9) = 9
End Sub

iam looking for this,i got it
 
Last edited:
Upvote 0
Something like this will work.

Code:
Sub shouldwork()Worksheets("Sheet1").Activate
Worksheets("Sheet1").Rows(9).Select


End Sub
 
Upvote 0
Sub notworking()


ThisWorkbook.Worksheets(1).cells(9, 9) = 9
End Sub

iam looking for this,i got it

So you actually want cell I9 :confused:? I never would have guessed that from post number 1.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,830
Messages
6,181,228
Members
453,025
Latest member
Hannah_Pham93

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