PC Review


Reply
Thread Tools Rate Thread

How do I prompt a user with a dialog box

 
 
=?Utf-8?B?TUhBUlRNQU5AbWFjLmNvbQ==?=
Guest
Posts: n/a
 
      22nd Nov 2005
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to delete the "Insert Function Dialog Box" (dialog box only)? =?Utf-8?B?VEJJJydkIGJpa2Vy?= Microsoft Excel Worksheet Functions 2 7th Apr 2007 09:18 PM
save prompt for user exit, but no save prompt for batch import? =?Utf-8?B?bHBq?= Microsoft Excel Misc 1 25th Feb 2006 03:08 AM
Error Message: Windows cannot find 'box,box,box,box,box' =?Utf-8?B?Ym91Y2hhcmRwaWU=?= Windows XP Help 2 25th Jul 2005 08:47 PM
Dialog box prompt where user can select multiple criteria =?Utf-8?B?SmVmZnNoZXg=?= Microsoft Access Reports 0 30th Jun 2005 02:12 PM
File Download Prompt (open/save dialog box) Chrissie Windows XP Internet Explorer 1 29th Jul 2004 05:17 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:35 PM.