How can i move an input box

WRECK

New Member
Joined
Apr 30, 2003
Messages
13
Hi,

I am using Excel on Windows NT.

I have wrote a macro, and use a button to start it. When i hit the button input boxes pop up asking for the required data to put in the spreadsheet. However the input box is right on top of where the data is going in the spreadsheet. I would like to move it over a bit so i can see the data as it is entered. How can i do this. I move it by dragging it but it keeps on going back to the original position.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Howdy,

InputBox(prompt[, title] [, default] [, xpos] [, ypos] [, helpfile, context])

From the HELP file for VBA
 
Upvote 0
Hello, thanks for the help, but i am still having trouble. What are the square brackets for?

Right now my code for the input box looks like this

Northing = CDbl(Val(InputBox("Enter the Northing of your starting point", "Northing")))

Where do i have to put the xpos and ypos to make it work?

Thanks
 
Upvote 0
InputBox(prompt[, title] [, default] [, xpos] [, ypos] [, helpfile, context])

These are all arguments not all of them are required [] are not required.

Prompt = The message you want in the InputBox body.
Title = Name or Text On the Title Bar of the box
Default = This would be the default value that is assigned if the user just clicks OK without inputing anything.

Xpos
Ypos This is where you place your coordinates to place the box within your active window.

InputBox("What Is Your Name?", "Question Box", "John Doe",7500,5000,)

These can all be either constants or variables. Read the HELP file for more info and better example.
 
Upvote 0
Just to Add to Ken's Advice.......

Just highlight the Key Word eg "Inputbox" and Press F1

The Help file can be a good source.....THEN if you need to know more post back and I'm sure someone can help out.
 
Upvote 0

Forum statistics

Threads
1,221,709
Messages
6,161,431
Members
451,705
Latest member
Priti_190

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top