2

the msg box was prompted with code :

StrInput = InputBox(Prompt:=strMsg, Title:="Location of Files", XPos:=2000, YPos:=2000)

im not sure how to change the size of the box. i want to because my strMsg is quite logn and doesnt look nice in a small box.

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
Chaostryder
  • 223
  • 2
  • 8
  • 18
  • Surely you want a file open/folder open dialog? InputBox() is a very primitive way to collect information interactively and I would never use it for something like this. You might try Googling "Access BrowseFolder". – David-W-Fenton Aug 24 '11 at 22:27
  • o nah i wasnt trying to get a file i just had a lot of instructions that came with the message box . some theres quite a bit in the 'strmsg' and it didnt look that good all crowded in the tiny box – Chaostryder Aug 25 '11 at 14:18

1 Answers1

5

There's no way I'm aware of to change the size of the inputbox. You have a couple of choices:

1) Force line breaks with vbCRLF like this: `message = "This line will end here: " & vbcrlf & "This appears on a new line"

2) Create your own form to act an input box. Depending on your VBA ability you can make a form with a textbox, label, OK button, and cancel button. Have that form use the string in the form opening arguments (OpenArgs) as the prompt text. That will give you a generic, customizable inputbox.

Banjoe
  • 1,768
  • 12
  • 13
  • I've tried the first and it didn't work. maybe I'll give the secodn a try but thats mroe difficult than i wouldve hoped =( . maybe changing the size of an input box is nto possible – Chaostryder Aug 23 '11 at 18:17
  • 2
    Unfortunately, even if it is possible it would probably require WinAPI calls and add the sort of complexity where you'd be better served by making your own inputbox anyway. – Banjoe Aug 23 '11 at 18:34
  • 1
    +1 for suggestion #2, which is really the only possible way to do this without overcomplicating things. – David-W-Fenton Aug 26 '11 at 21:15