Macro error

  • Thread starter Thread starter orquidea
  • Start date Start date
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
 
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%"
 
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
Formula - Macro 7
Macro with formula 3
Macro - Vlookup 6
Macro error 2

Back
Top