Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a troubles to set up width of application's window.
Due to some reasons I want my application's window cover 10 columns exactly(e.g. user see only 10 columns) If I handy move application's window so it cover 10 columns and check application's width by this code: MsgBox Application.Width I get number 492 ( I read in help that it is in POINT - about 1/72 inch) If I run next code: Sub fghfs() For i = 1 To 10 a = a + ActiveSheet.Columns(i).ColumnWidth Next MsgBox a End Sub I get number 81 - and in the help I read that it the SAME point (???) Can anybody explain me difference between points in width in two cases? At the end I need code like: Application.wide = "Sum of wides of 10 columns " Thanks Leo |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Think you misread the help. Width is in points. For ColumnWidth it says:
One unit of column width is equal to the width of one character in the Normal style. For proportional fonts, the width of the character 0 (zero) is used. Use the Width property to return the width of a column in points. -- Regards, Tom Ogilvy "Leo" wrote in message om... I have a troubles to set up width of application's window. Due to some reasons I want my application's window cover 10 columns exactly(e.g. user see only 10 columns) If I handy move application's window so it cover 10 columns and check application's width by this code: MsgBox Application.Width I get number 492 ( I read in help that it is in POINT - about 1/72 inch) If I run next code: Sub fghfs() For i = 1 To 10 a = a + ActiveSheet.Columns(i).ColumnWidth Next MsgBox a End Sub I get number 81 - and in the help I read that it the SAME point (???) Can anybody explain me difference between points in width in two cases? At the end I need code like: Application.wide = "Sum of wides of 10 columns " Thanks Leo |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Tom Ogilvy" wrote in message ...
Think you misread the help. Width is in points. For ColumnWidth it says: One unit of column width is equal to the width of one character in the Normal style. For proportional fonts, the width of the character 0 (zero) is used. Use the Width property to return the width of a column in points. -- Regards, Tom Ogilvy ================================================== ===== Thanks Tom , I really misread the help .... Regards, Leo "Leo" wrote in message om... I have a troubles to set up width of application's window. Due to some reasons I want my application's window cover 10 columns exactly(e.g. user see only 10 columns) If I handy move application's window so it cover 10 columns and check application's width by this code: MsgBox Application.Width I get number 492 ( I read in help that it is in POINT - about 1/72 inch) If I run next code: Sub fghfs() For i = 1 To 10 a = a + ActiveSheet.Columns(i).ColumnWidth Next MsgBox a End Sub I get number 81 - and in the help I read that it the SAME point (???) Can anybody explain me difference between points in width in two cases? At the end I need code like: Application.wide = "Sum of wides of 10 columns " Thanks Leo |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
application.match and value problem | Excel Discussion (Misc queries) | |||
Application.OnKey problem | Excel Programming | |||
Application Problem | Excel Programming | |||
Problem width width-property | Excel Programming | |||
Problem in running an application | Excel Programming |