Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I prompt a user with a dialog box

I am new to programing in Excel and would like to creat a front end dialog
that prompts the user for a date. Then returning information be in a text
field so they can copy it and paste into their apps.

Is this even possible?

Here is a macro I made the extract the info and filters it. It is all hard
coded.

Sub DOOR_COUNTS()
'
' DOOR_COUNTS Macro
' Macro recorded by m.hartman
'

'
Workbooks.OpenText Filename:="\\Softail\doorcount\Count\Main.txt",
Origin:= _
437, StartRow:=1, DataType:=xlDelimited,
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False,
Comma:=False _
, Space:=False, Other:=True, OtherChar:="|",
FieldInfo:=Array(Array(1, 1 _
), Array(2, 1), Array(3, 2), Array(4, 1), Array(5, 2), Array(6, 1),
Array(7, 2), Array(8, 1), _
Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13,
1)), _
TrailingMinusNumbers:=True
Columns("A:B").Select
Selection.Delete Shift:=xlToLeft
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
Columns("C:C").Select
Selection.Delete Shift:=xlToLeft
Columns("D:E").Select
Selection.Delete Shift:=xlToLeft
Columns("F:F").Select
Selection.Delete Shift:=xlToLeft
Columns("C:C").ColumnWidth = 18.57
Columns("B:B").Select
Selection.ColumnWidth = 13.71
Selection.ColumnWidth = 16
Columns("A:E").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Rows("1:1").Select
Selection.Insert Shift:=xlDown
Range("A1").Select
ActiveCell.FormulaR1C1 = "DOOR ID"
Range("B1").Select
ActiveCell.FormulaR1C1 = "DESCRIPTION"
Range("C1").Select
ActiveCell.FormulaR1C1 = "DATE"
Range("D1").Select
ActiveCell.FormulaR1C1 = "IN"
Range("E1").Select
ActiveCell.FormulaR1C1 = "OUT"
Range("A1:E1").Select
With Selection.Interior
.ColorIndex = 56
.Pattern = xlSolid
End With
Selection.Font.ColorIndex = 2
Selection.Font.Bold = True
Range("E1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=3, Criteria1:="11/21/2005 22:00:00"

Workbooks.OpenText Filename:="\\Softail\doorcount\Count\Buell.txt",
Origin:= _
437, StartRow:=1, DataType:=xlDelimited,
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False,
Comma:=False _
, Space:=False, Other:=True, OtherChar:="|",
FieldInfo:=Array(Array(1, 1 _
), Array(2, 1), Array(3, 2), Array(4, 1), Array(5, 2), Array(6, 1),
Array(7, 2), Array(8, 1), _
Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13,
1)), _
TrailingMinusNumbers:=True
Columns("A:B").Select
Selection.Delete Shift:=xlToLeft
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
Columns("C:C").Select
Selection.Delete Shift:=xlToLeft
Columns("D:E").Select
Selection.Delete Shift:=xlToLeft
Columns("F:F").Select
Selection.Delete Shift:=xlToLeft
Columns("C:C").ColumnWidth = 18.57
Columns("B:B").Select
Selection.ColumnWidth = 13.71
Selection.ColumnWidth = 16
Columns("A:E").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Rows("1:1").Select
Selection.Insert Shift:=xlDown
Range("A1").Select
ActiveCell.FormulaR1C1 = "DOOR ID"
Range("B1").Select
ActiveCell.FormulaR1C1 = "DESCRIPTION"
Range("C1").Select
ActiveCell.FormulaR1C1 = "DATE"
Range("D1").Select
ActiveCell.FormulaR1C1 = "IN"
Range("E1").Select
ActiveCell.FormulaR1C1 = "OUT"
Range("A1:E1").Select
With Selection.Interior
.ColorIndex = 56
.Pattern = xlSolid
End With
Selection.Font.ColorIndex = 2
Selection.Font.Bold = True
Range("E1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=3, Criteria1:="11/21/2005 22:00:00"

Workbooks.OpenText
Filename:="\\Softail\doorcount\Count\Service.txt", Origin:= _
437, StartRow:=1, DataType:=xlDelimited,
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False,
Comma:=False _
, Space:=False, Other:=True, OtherChar:="|",
FieldInfo:=Array(Array(1, 1 _
), Array(2, 1), Array(3, 2), Array(4, 1), Array(5, 2), Array(6, 1),
Array(7, 2), Array(8, 1), _
Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13,
1)), _
TrailingMinusNumbers:=True
Columns("A:B").Select
Selection.Delete Shift:=xlToLeft
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
Columns("C:C").Select
Selection.Delete Shift:=xlToLeft
Columns("D:E").Select
Selection.Delete Shift:=xlToLeft
Columns("F:F").Select
Selection.Delete Shift:=xlToLeft
Columns("C:C").ColumnWidth = 18.57
Columns("B:B").Select
Selection.ColumnWidth = 13.71
Selection.ColumnWidth = 16
Columns("A:E").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Rows("1:1").Select
Selection.Insert Shift:=xlDown
Range("A1").Select
ActiveCell.FormulaR1C1 = "DOOR ID"
Range("B1").Select
ActiveCell.FormulaR1C1 = "DESCRIPTION"
Range("C1").Select
ActiveCell.FormulaR1C1 = "DATE"
Range("D1").Select
ActiveCell.FormulaR1C1 = "IN"
Range("E1").Select
ActiveCell.FormulaR1C1 = "OUT"
Range("A1:E1").Select
With Selection.Interior
.ColorIndex = 56
.Pattern = xlSolid
End With
Selection.Font.ColorIndex = 2
Selection.Font.Bold = True
Range("E1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=3, Criteria1:="11/21/2005 22:00:00"
End Sub
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dialog prompt during opening of file markuss New Users to Excel 1 June 21st 06 11:32 AM
save prompt for user exit, but no save prompt for batch import? lpj Excel Discussion (Misc queries) 1 February 25th 06 02:08 AM
Prompt user to select file with default file selected dialog Bruce Cooley Excel Programming 0 September 15th 03 06:43 AM
Prompt user to select file with default file selected dialog Bob Phillips[_5_] Excel Programming 0 September 14th 03 09:22 PM
Prompt user to select file with default file selected dialog Bob Phillips[_5_] Excel Programming 0 September 14th 03 09:19 PM


All times are GMT +1. The time now is 01:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"