Negative numbers in a spreadsheet cell

L

Lily

I have the following code in my ppt vba working on an open spreadsheet

dim s as string

s=worksheet.cells(1, 1)

It works fine for most cells. However, when the value is negative number,
i.e.,
-8.75, I got a type mismatch error. And I couldn't find a way to get around.

Does anyone have a solution?

thanks,
 

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

Top