Macro error

O

orquidea

Hi All:

I want to get the result in saskour20per as a percentage. I wrote the below
procedure which is generating the error "invalid qualifier".

Saskour20per.Value = (saskour20 / sask20)
Saskour20per.NumberFormat = "0.00%"

Could anyone help me to debug this macro?

Thanks in advance
Orquidea
 
G

Gary''s Student

Your code will work if Saskour20per is a Range variable that has been
assinged a value. The values of the numerator and denominator must also be
established as well. Something like:

Dim Saskour20per as Range
Set Saskour20per=Range("A1")
Saskour20per.Value = (saskour20 / sask20)
Saskour20per.NumberFormat = "0.00%"
 
O

orquidea

thanks for your answer.

Gary''s Student said:
Your code will work if Saskour20per is a Range variable that has been
assinged a value. The values of the numerator and denominator must also be
established as well. Something like:

Dim Saskour20per as Range
Set Saskour20per=Range("A1")
Saskour20per.Value = (saskour20 / sask20)
Saskour20per.NumberFormat = "0.00%"
 

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

Similar Threads

Percentage formating in macro 4
Formating percentage in macro 2
Help in macro 3
macro wich saves files 5
Macro with formula 3
Formula - Macro 7
Macro error 2
Delete rows that start with CCNUXXXX with macro 5

Top