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

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
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,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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