View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default VBA format function Win2000 and WinXP

on the WinXP computer, after the error, go into the VBE to tools=References
and see if you have a reference marked MISSING.

If so, fix this reference as it is the cause of your problem - probably
totally unrelated to Format, but that is where the error manifests.

the lazy workaround would be vba.Format instead of just format.

--
Regards,
Tom Ogilvy


"Tord" wrote in message
...
I am using the "Format function" to format the apperance of the caption of

a
label in a dialog box. The "Format function" is working ok on my Win2000
computer. But when I switch copmputer to my WinXp computer, the "Format
function" is not working. It seems like the "Format function" will not

work
when the worksheet is created on a Win2000 computer and then later is

opend
on a computer using WinXP.

Plate.lbl49.Caption = Format(Worksheets("DimAlu").Cells(44, 2).Value, "###
### ###")

This line of code wil format the caption in label (lbl49) on the dialogbox
(Plate) with space between every third digit. It works on Win200

computers,
but not on a WinXP computer.

Is there anybody who know why this is happening and what is the solution

to
this problem?

Tord