Assign cell content to variable

Hello,

In VBA (Excel 2003), I am trying to assign the content of a cell to a variable. I tried it like this:

 Dim Type As String Type = wsExcel.Range("L" & Lig).Value


but it's not working!
If you have any solutions to propose, thank you!

Configuration: Windows 2000 Firefox 2.0.0.14

7 answers

  1. Hi,

    what happens if you remove your .value?
    1. Hi shishumi,

      I removed .value but I'm still getting the same runtime error (91: Object variable or With block variable not set)

      Would you have another solution to suggest? Thank you for taking an interest in my problem; it's a small question but I'm a beginner in VBA...