Error 1004 in a very simple command

  • Hi all,


    I did not use VBA for a while and I have an error 1004 when using this very simple command. I don't know what I have wrong there as it is very basic. (the range "start" is defined in the sheet "Output")


    thanks a lot for your help


    Code
    Sub simple()
    Dim under_unit As Variant
    under_unit = ThisWorkbook.Worksheets("Output").Range("start").Value
    
    
    End Sub
  • Re: Error 1004 in a very simple command


    I made the sub even more simple by calling range("a2"), and i get the same bug. Please Help!!!


    Code
    Sub simple() 
    Dim under_unit As Variant 
    under_unit = ThisWorkbook.Worksheets("Output").Range("A2").Value 
    
    
    End Sub
  • Re: Error 1004 in a very simple command


    I retyped the names of the range in the vba formulas and it works now... Probably a space issue as you mentionned but i did not change the actual names of tabs/cells, just retyped the formulas... weird but not its working. thanks a lot!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!