VBA macro Trignometry function

S

Spint

Hi,
I am very much new to VBA programming, started just two days ago.
i need to write a code which uses cos and sin functions.
i tried using Sin and Cos functions.

but i have got a strange problem, that when ever i type Cos in VB
editor , as soon as i hit enter Cos is changing to COS.

I actually tried to create a function named COS and call Cos from tha
Initially,
But i deleted, since then whenever i type Cos it is changing to COS.

Please help how to solve this problem.

Thanks in Advance
 
J

joeu2004

Spint said:
when ever i type Cos in VBA editor , as soon as i hit
enter Cos is changing to COS.
I actually tried to create a function named COS [...].
But i deleted, since then whenever i type Cos it is
changing to COS.

Right, that was my experience when I tested this. Simply creating any
variable named COS, then deleting it causes VBA to remember that Cos was
once written COS. And AFAIK, nothing will change that except....

Replace COS with myCos (any capitalization will do) throughout the module,
export it, and remove it. Then save and close the workbook.

Reopen the workbook, import the module, and replace myCos with Cos. Save
the workbook.

Note: I tried this with only one module. You might need to experiment
further if you have multiple modules. Worst-case scenario: you might need
to export and remove every module.
 
S

Spint

'joeu2004[_2_ said:
;1603820']"Spint said:
when ever i type Cos in VBA editor , as soon as i hit
enter Cos is changing to COS.
I actually tried to create a function named COS [...].
But i deleted, since then whenever i type Cos it is
changing to COS.-

Right, that was my experience when I tested this. Simply creating any
variable named COS, then deleting it causes VBA to remember that Co
was
once written COS. And AFAIK, nothing will change that except....

Replace COS with myCos (any capitalization will do) throughout th
module,
export it, and remove it. Then save and close the workbook.

Reopen the workbook, import the module, and replace myCos with Cos.
Save
the workbook.

Note: I tried this with only one module. You might need to experiment
further if you have multiple modules. Worst-case scenario: you migh
need
to export and remove every module.

Thank you joeu2004 for your suggestion.

I actually removed all the modules and copied the code.
i was having very less modules, so less pain
 

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