i am using a inputbox function in my excel sheet to input values
Dim I As Integer
Dim str As String
'InputBox(Prompt[,Title][,Default][,x][,y][,HelpFile][,HelpContextId)][,Type])
str = Application.InputBox("This is a test", "Demo", Type:=2) ' title and default understood
so far this works fine.
But i wanted to know what is xpos and ypos and how or what values to be assigned
can i make a word file on my desktop and connect that as a help file so that users can just click and refer them while inputting the references
Can some one tell me how to use the last for options xpos, ypos,helpfile,helpcontextid.
I have searched lot of sites for info they only say as optional parameters and not much examples on that subjects.
many thanx
If you look up Excel help in the VBA editor you will get more information - it is rare you will ever need to use xpos ypos, helpfile, context
xpos and ypos are the most likely you will use
xpos is Optional. Numeric expression that specifies, in twips, the horizontal distance of the left edge of the dialog box from the left edge of the screen. If xpos is omitted, the dialog box is horizontally centered
ypos is Optional as well. Numeric expression that specifies, in twips, the vertical distance of the upper edge of the dialog box from the top of the screen. If ypos is omitted, the dialog box is vertically positioned approximately one-third of the way down the screen.
1 Twip is 1/1440 of an inch - it is a display measurement
If you use a helpfile you must use a context file however these are rarely used.
Last edited by smuzoen; 01-24-2012 at 06:04 AM.
Hope this helps.
Anthony
Pack my box with five dozen liquor jugs
PS: Remember to mark your questions as Solved once you are satisfied. Please rate the answer(s) by selecting the Star in the lower left next to the Triangle. It is appreciated”
X and Y refer to the position of the inputbox upon initialization. The default is a centered position, but you can, by incrementing the x and y coordinates specify the location relative to the top left of the application.
Left** Optional Variant. Specifies an x position for the dialog box in relation to the upper-left corner of the screen, in points.
Top** Optional Variant. Specifies a y position for the dialog box in relation to the upper-left corner of the screen, in points.
I've never adjusted these, but I assume that by 'points', you would enter a non-decimal integer, much like the top and left attributes when accessing the properties of an ActiveX Control (like a command button, toggle button, combo box, etc.)
-hth-
Alvarosiza, Smuzoen thanx a ton for ur replies. it helped me a lot.
i think i will also not bother about those xpos and ypos when ever i am using inputbox function.
thanx for letting me know about that
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks