View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] james.billy@gmail.com is offline
external usenet poster
 
Posts: 69
Default Importing an Excel file and prompting user for input

On 20 Sep, 16:06, Mitch wrote:
I'm still new to this, but I'm looking at WMI to maybe do this. (Please
correct me if I should just use .net to do this.)

I'm looking at a 'report file' in Excel, I can either CSV it or keep it in
the same format.
I need to copy that information and basically 'add' specific information
say, name, invoice, item and cost, and prompt the user for a special note, or
say if it's not a unique order.

Is this possible in Excel (Prompting for a file import, then prompting the
user for input via dialogue boxes?)

Or should I look at a script file to just handle the construction of the file?
Mitch


Its possible in Excel, this should get you started:

File import in vba would be:

dim TestName as Variant
TestName = Application.GetOpenFileName()
if TestName = False then
Msgbox "No File Selected"
Exit Sub
End if
Workbooks.open TestName

An input box would be:

dim TmpStr as String
TmpStr = InputBox("Enter Note", "Please Enter a note")
Range("A1") = TmpStr 'Users Note in cell A1

James

 
ExcelBanter Database Error
Database Error Database error
The ExcelBanter database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.excelbanter.com home page, then try to open another page.
  • Click the Back button to try another link.
The www.excelbanter.com forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.