Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When the user is selecting a file to open, I want to deactivate the X (Close
Button) so the user can not exit out of the macro. Do you know if this can be done? With Application.FileDialog(msoFileDialogFilePicker) .AllowMultiSelect = False .Filters.Add "Text files", "*.den" If .Show = True Then Txt = .SelectedItems(1) 'Import data For x = LBound(ColumnsDesired) To UBound(ColumnsDesired) ColumnArray(x, 1) = ColumnsDesired(x) ColumnArray(x, 2) = DataTypeArray(x) Next x Workbooks.OpenText Filename:=Txt, _ DataType:=xlFixedWidth, FieldInfo:=ColumnArray ActiveSheet.UsedRange.Copy Destination:=Isheet.Range("A1") ActiveWorkbook.Close SaveChanges:=False End If End With -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200701/1 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deactivating a macro button | Excel Discussion (Misc queries) | |||
Deactivating a Forms macro button based on a worksheet condition? | Excel Discussion (Misc queries) | |||
Don't let user close. Use macro button to close? | Excel Programming | |||
Excel shoud not close all active books when clicking close button | Excel Discussion (Misc queries) | |||
excel - Windows close button (x) should only close active workboo. | Setting up and Configuration of Excel |