WardenBerret
New Member
- Joined
- Mar 2, 2016
- Messages
- 9
Hi, i am back :P
My vba script is 99% done, but something stupid always happens with me... its like vba is actively working against my progress
Now I get the error described in the title and this code is the culprit:
The thing is, that it worked perfectly before.. i had not changed this specific code any bit except for when I added it... then suddenly it gave me an error. - it happened seemingly after i added the code to export the excel sheet as pdf... but that and the error have nothing in commin so i am stumped
I've defined the relevant variables as:
Big thanks, best regard.
PS. If you need more info, let me know.
My vba script is 99% done, but something stupid always happens with me... its like vba is actively working against my progress

Now I get the error described in the title and this code is the culprit:
Code:
ws1.Range("A13,C14:C26,A14:A26").Interior.Color = RGB(255, 255, 0)
The thing is, that it worked perfectly before.. i had not changed this specific code any bit except for when I added it... then suddenly it gave me an error. - it happened seemingly after i added the code to export the excel sheet as pdf... but that and the error have nothing in commin so i am stumped

I've defined the relevant variables as:
Code:
Dim wbTarget As Workbook 'workbook where the data is to be pasted Dim ws1 As Worksheet
Set wbTarget = Workbooks.Open("*path*")
Set ws1 = wbTarget.Sheets("Sheet1")
Big thanks, best regard.
PS. If you need more info, let me know.