ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Format Function stopped working... (https://www.excelbanter.com/excel-programming/299980-format-function-stopped-working.html)

The Wonder Thing

Format Function stopped working...
 
Hello everyone, I have a very strange problem

I've written quite a few macros to help me in my job, and a lot of them include the Format command, for things like

myPriceCol = InputBox("Please Enter the Price Column Letter", "B"

For each c in ActiveSheet.Range("C2:C"+Format(ActiveSheet.UsedRa nge.Rows.Count)
c.Value = "Stuff
ActiveSheet.Range(myPriceCol + Format(c.Row)).Value = "More Stuff
Nex

Suddenly today, all the Format functions in all my macros stopped working and give me a "wrong number of arguments or invalid property assignment error". If tried doing simple ones like

myTest = Format(27

and even those give me the error

If anybody could shed some light on this, how to fix it, why it happened, and how to stop it from happening again, that would be great

I'll check for replies here later today, or you could e-mail me at , either would be appreciated.

The Wonder Thing

Format Function stopped working...
 
Oh, and I just checked the function in other workbooks. It still works there. I have no idea what could have changed in... Wait! I got it! *slaps forehead and beats it on desk* Man that was dumb! I just made another macro to format a series of sheets the way I want them, and guess what I called it? You guessed it, "Format". :

Anyways, thanks for reading this anyways




All times are GMT +1. The time now is 09:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com