Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to be able to allow a user input the selected DBF file name
into the code instead of instructing them to name the DBF file as export. Below is the code I currently use to copy the data into my worksheet. Also there would need to be an error message that let them know that the file wasn't opened if they either forget to open the file before running the macro or misspell the name. Any help would be appreciated. Joel Sub CopyData() Worksheets("Export").Activate ' Dim Asheet, Abook As String Abook = ActiveWorkbook.Name Asheet = ActiveSheet.Name 'This copies the data from the dbf file into the Worksheet Titled "Export" Windows("Export.DBF").Activate Range("A1").Select ActiveCell.CurrentRegion.Select Selection.Copy Windows(Abook).Activate Worksheets(Asheet).Activate Range("A1").Select ActiveSheet.Paste Worksheets("Instructions").Activate End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Prompt user for input and utilize that input | Excel Worksheet Functions | |||
Have user input converted to uppercase in same cell as input? | New Users to Excel | |||
Calling an Excel/VBA User Created Module from WSH | Excel Programming | |||
Making Contents of a cell input for a Module | Excel Programming | |||
CODE to select range based on User Input or Value of Input Field | Excel Programming |