Compile Error: Invalid qualifier

nvreddy

New Member
Joined
Dec 11, 2017
Messages
4
My code is :

Sub Calculating()

Dim header As String

With header.Range("A1") = "Name"

.Cells(1, "B") = "Class"
.Cells(1, "C") = "Subject"
.Cells(1, "D") = Range("d1") = "Marks Secured"

The above code is causing to throw error as Compile Error: Invalid Qualifier.

Could you please help me out from this.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
header needs to be a sheet name or a variable of a sheet called header.
Possibly you meant Sheets("header")
 
Last edited:
Upvote 0
"header" is variable.

and also could you please let me know as "Am I not posting my questions as guidelines" as I am new this forum.
 
Upvote 0
If it is a variable where are you creating it because you aren't in the code you posted and as you have it written it wouldn't be a string?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,957
Messages
6,122,466
Members
449,086
Latest member
kwindels

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