Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have an input box with the following code
quotenumber = InputBox("Please enter QUOTE to recall. If you are recalling a quote from Server3 then type in \\server3\jobs\estimate1\new_quot1\ and the quote number", "The Auld Company", "C:\quotes\") I would like to be able to select the another path"\\server3\jobs\estimate1\new_quot1\" without having to type it in oldjay |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Are you trying to open an existing file?
If yes, look at application.getopenfilename in VBA's help: Dim WkbkName As Variant WkbkName = Application.GetOpenFilename(filefilter:="Excel files, *.xls") If WkbkName = False Then Exit Sub 'user hit cancel End If ===== I don't have a network to test this on--you may have to type in the start of the UNC path to be able to choose deeper levels. If you map that path to a drive letter, it may be easier to traverse. Oldjay wrote: I have an input box with the following code quotenumber = InputBox("Please enter QUOTE to recall. If you are recalling a quote from Server3 then type in \\server3\jobs\estimate1\new_quot1\ and the quote number", "The Auld Company", "C:\quotes\") I would like to be able to select the another path"\\server3\jobs\estimate1\new_quot1\" without having to type it in oldjay -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I can't understand yoyur message
Maybe I can be a little clear I want an input box (or something) that will give two options one that will show a path to one folder and also a path to another folder "Dave Peterson" wrote: Are you trying to open an existing file? If yes, look at application.getopenfilename in VBA's help: Dim WkbkName As Variant WkbkName = Application.GetOpenFilename(filefilter:="Excel files, *.xls") If WkbkName = False Then Exit Sub 'user hit cancel End If ===== I don't have a network to test this on--you may have to type in the start of the UNC path to be able to choose deeper levels. If you map that path to a drive letter, it may be easier to traverse. Oldjay wrote: I have an input box with the following code quotenumber = InputBox("Please enter QUOTE to recall. If you are recalling a quote from Server3 then type in \\server3\jobs\estimate1\new_quot1\ and the quote number", "The Auld Company", "C:\quotes\") I would like to be able to select the another path"\\server3\jobs\estimate1\new_quot1\" without having to type it in oldjay -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
An inputbox is used to get a value that the user typed in.
I guess you could do something like: Sub testme() Dim Folder1 As String Dim Folder2 As String Dim resp As String Dim UseThisOne As String 'your samples weren't different Folder1 = "\\server3\jobs\estimate1\new_quot1\" Folder2 = "\\server3\jobs\estimate1\new_quot2\" UseThisOne = "" Do resp = InputBox(Prompt:="1. " & Folder1 & vbLf & _ "2. " & Folder2 & vbLf & _ vbLf & _ "Enter 1 or 2") Select Case Trim(resp) Case Is = "1": UseThisOne = Folder1 Case Is = "2": UseThisOne = Folder2 Case Is = "": Exit Do End Select If UseThisOne = "" Then 'keep waiting for a valid answer Else Exit Do End If Loop If UseThisOne = "" Then Exit Sub End If 'show that it worked MsgBox UseThisOne End Sub Oldjay wrote: I can't understand yoyur message Maybe I can be a little clear I want an input box (or something) that will give two options one that will show a path to one folder and also a path to another folder "Dave Peterson" wrote: Are you trying to open an existing file? If yes, look at application.getopenfilename in VBA's help: Dim WkbkName As Variant WkbkName = Application.GetOpenFilename(filefilter:="Excel files, *.xls") If WkbkName = False Then Exit Sub 'user hit cancel End If ===== I don't have a network to test this on--you may have to type in the start of the UNC path to be able to choose deeper levels. If you map that path to a drive letter, it may be easier to traverse. Oldjay wrote: I have an input box with the following code quotenumber = InputBox("Please enter QUOTE to recall. If you are recalling a quote from Server3 then type in \\server3\jobs\estimate1\new_quot1\ and the quote number", "The Auld Company", "C:\quotes\") I would like to be able to select the another path"\\server3\jobs\estimate1\new_quot1\" without having to type it in oldjay -- Dave Peterson -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Dave I get a compile error with Trim highlighted "can't find project or libary
"Dave Peterson" wrote: An inputbox is used to get a value that the user typed in. I guess you could do something like: Sub testme() Dim Folder1 As String Dim Folder2 As String Dim resp As String Dim UseThisOne As String 'your samples weren't different Folder1 = "\\server3\jobs\estimate1\new_quot1\" Folder2 = "\\server3\jobs\estimate1\new_quot2\" UseThisOne = "" Do resp = InputBox(Prompt:="1. " & Folder1 & vbLf & _ "2. " & Folder2 & vbLf & _ vbLf & _ "Enter 1 or 2") Select Case Trim(resp) Case Is = "1": UseThisOne = Folder1 Case Is = "2": UseThisOne = Folder2 Case Is = "": Exit Do End Select If UseThisOne = "" Then 'keep waiting for a valid answer Else Exit Do End If Loop If UseThisOne = "" Then Exit Sub End If 'show that it worked MsgBox UseThisOne End Sub Oldjay wrote: I can't understand yoyur message Maybe I can be a little clear I want an input box (or something) that will give two options one that will show a path to one folder and also a path to another folder "Dave Peterson" wrote: Are you trying to open an existing file? If yes, look at application.getopenfilename in VBA's help: Dim WkbkName As Variant WkbkName = Application.GetOpenFilename(filefilter:="Excel files, *.xls") If WkbkName = False Then Exit Sub 'user hit cancel End If ===== I don't have a network to test this on--you may have to type in the start of the UNC path to be able to choose deeper levels. If you map that path to a drive letter, it may be easier to traverse. Oldjay wrote: I have an input box with the following code quotenumber = InputBox("Please enter QUOTE to recall. If you are recalling a quote from Server3 then type in \\server3\jobs\estimate1\new_quot1\ and the quote number", "The Auld Company", "C:\quotes\") I would like to be able to select the another path"\\server3\jobs\estimate1\new_quot1\" without having to type it in oldjay -- Dave Peterson -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Open excel
Open your workbook Go into the VBE Select your project Tools|References Look for MISSING reference. Uncheck that missing reference. The missing reference may not (usually doesn't) have anything to do with the line that caused the error. Oldjay wrote: Dave I get a compile error with Trim highlighted "can't find project or libary "Dave Peterson" wrote: An inputbox is used to get a value that the user typed in. I guess you could do something like: Sub testme() Dim Folder1 As String Dim Folder2 As String Dim resp As String Dim UseThisOne As String 'your samples weren't different Folder1 = "\\server3\jobs\estimate1\new_quot1\" Folder2 = "\\server3\jobs\estimate1\new_quot2\" UseThisOne = "" Do resp = InputBox(Prompt:="1. " & Folder1 & vbLf & _ "2. " & Folder2 & vbLf & _ vbLf & _ "Enter 1 or 2") Select Case Trim(resp) Case Is = "1": UseThisOne = Folder1 Case Is = "2": UseThisOne = Folder2 Case Is = "": Exit Do End Select If UseThisOne = "" Then 'keep waiting for a valid answer Else Exit Do End If Loop If UseThisOne = "" Then Exit Sub End If 'show that it worked MsgBox UseThisOne End Sub Oldjay wrote: I can't understand yoyur message Maybe I can be a little clear I want an input box (or something) that will give two options one that will show a path to one folder and also a path to another folder "Dave Peterson" wrote: Are you trying to open an existing file? If yes, look at application.getopenfilename in VBA's help: Dim WkbkName As Variant WkbkName = Application.GetOpenFilename(filefilter:="Excel files, *.xls") If WkbkName = False Then Exit Sub 'user hit cancel End If ===== I don't have a network to test this on--you may have to type in the start of the UNC path to be able to choose deeper levels. If you map that path to a drive letter, it may be easier to traverse. Oldjay wrote: I have an input box with the following code quotenumber = InputBox("Please enter QUOTE to recall. If you are recalling a quote from Server3 then type in \\server3\jobs\estimate1\new_quot1\ and the quote number", "The Auld Company", "C:\quotes\") I would like to be able to select the another path"\\server3\jobs\estimate1\new_quot1\" without having to type it in oldjay -- Dave Peterson -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
input box scrolling with barcode reader input | Excel Discussion (Misc queries) | |||
input in number form is being multiplied by 1000 when i input. | Excel Discussion (Misc queries) | |||
Have user input converted to uppercase in same cell as input? | New Users to Excel | |||
How do I add input data in the input ranges in drop down boxes. | Excel Discussion (Misc queries) | |||
=SUMIF(Input!H2:H718,AZ19,Input!E2:E685)AND(IF | Excel Worksheet Functions |