Variable assignment from cell value

  • Thread starter Thread starter Vince Parsons
  • Start date Start date
V

Vince Parsons

Greetings all,

I am trying to assign a variable based on a cell value.

Dim File2 As String
File2 = (Worksheets("Sheet3").Cell("B2").Value)

Ofcourse, this doesn't work.

Thanks for any hel
 
File2 = CStr(Worksheets("Sheet3").Range("B2").Value)

or

Cstr(Worksheets("Sheet3").Cells(2,2).Value)
 
Hi
nearly there :-)
Try
File2 = Worksheets("Sheet3").Range("B2").Value
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top