Invalid qualifier

Robert E Lee

Active Member
Joined
Aug 10, 2005
Messages
266
Hi All

I have set Bcode as String, and have created this string by concatenating the contents of 3 separate cells interspersed with "/".
I now need to copy this string to another sheet but the code fails on the second use of BCode with the message "invalid qualifier"

I am clearly doing something wrong but cannot see what it is

Any suggestions
Thanks
Rob
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Fair enough, here is the relevant code

Code:
Bcode = NA &"/"& NB &"/"&  NC

Where NA NB and NC are strings formed from the contents of various cells.

The second Bcode is marked as invalid qualifier

Rob
 
Upvote 0
You cannot use .Copy on a string, what are you trying to do with the string?
 
Upvote 0
You can just assign it to the relevant cell on another sheet directly - e.g.:

Code:
Sheets("some sheet").Range("A2").value = Bcode
 
Upvote 0
Glad we could help. :biggrin:
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,515
Messages
6,119,972
Members
448,933
Latest member
Bluedbw

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