Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
InputBox Ypos Calculator, oct07
Hi -
I want to build a function that will assist in setting the Ypos for an InputBox. I have a lot of variability in how deep they are, and if there's a lot of text lines I want the Ypos 'higher' on the screen. What's your take on the following before I start barking up the wrong tree: About 42 characters before a text line wraps around. The vbCr constant is Chr(13). So .... a formula to get the text line count to vary the Ypos would be something like: Qtylines = int(len(concatenation of string vars in box msg) / 42) plus results of a loop that counts the occurances of chr(13) in the aforementioned concatenation. The result would not have to be exact, but a decent 'indicator'. Thanks. -- Neal Z |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
InputBox Ypos Calculator, oct07
Have you tried using the height property of the text box. If you are adding
Chr(13) the textbox should automatically increase in height. Fill the box then quickly move the box to the correct position. You could hide the textbox while you are filling the data and setting the position and then make it visible. "Neal Zimm" wrote: Hi - I want to build a function that will assist in setting the Ypos for an InputBox. I have a lot of variability in how deep they are, and if there's a lot of text lines I want the Ypos 'higher' on the screen. What's your take on the following before I start barking up the wrong tree: About 42 characters before a text line wraps around. The vbCr constant is Chr(13). So .... a formula to get the text line count to vary the Ypos would be something like: Qtylines = int(len(concatenation of string vars in box msg) / 42) plus results of a loop that counts the occurances of chr(13) in the aforementioned concatenation. The result would not have to be exact, but a decent 'indicator'. Thanks. -- Neal Z |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
InputBox Ypos Calculator, oct07
Joel -
I relooked at the parms for an inputbox and cannot find the height property. Your response mentions text box, is it possible you misread my INPUTBOX for TEXTBOX? thanks, Neal "Joel" wrote: Have you tried using the height property of the text box. If you are adding Chr(13) the textbox should automatically increase in height. Fill the box then quickly move the box to the correct position. You could hide the textbox while you are filling the data and setting the position and then make it visible. "Neal Zimm" wrote: Hi - I want to build a function that will assist in setting the Ypos for an InputBox. I have a lot of variability in how deep they are, and if there's a lot of text lines I want the Ypos 'higher' on the screen. What's your take on the following before I start barking up the wrong tree: About 42 characters before a text line wraps around. The vbCr constant is Chr(13). So .... a formula to get the text line count to vary the Ypos would be something like: Qtylines = int(len(concatenation of string vars in box msg) / 42) plus results of a loop that counts the occurances of chr(13) in the aforementioned concatenation. The result would not have to be exact, but a decent 'indicator'. Thanks. -- Neal Z |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calculator | Excel Discussion (Misc queries) | |||
Integrated calculator in excel 07 instead of separate calculator | Excel Programming | |||
uk tax calculator | New Users to Excel | |||
Inputbox and Application.InputBox | Excel Programming | |||
Pop-up calculator? | Excel Programming |