ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Drop down arrow disappear (https://www.excelbanter.com/excel-programming/323803-drop-down-arrow-disappear.html)

broogle

Drop down arrow disappear
 
I have a drop down list in my data validation, but everytime I run my
code, the drop down button will disappear, to get it back I have to
close my excel (not just the current worksheet) and re-run it again.
Which code is taking control of this button ? Thanks


Jean-Yves[_2_]

Drop down arrow disappear
 
Hi,

Without your code, hard to say. Add a copy to your posting.
Regards

Jean-Yves

"broogle" wrote in message
ups.com...
I have a drop down list in my data validation, but everytime I run my
code, the drop down button will disappear, to get it back I have to
close my excel (not just the current worksheet) and re-run it again.
Which code is taking control of this button ? Thanks




broogle

Drop down arrow disappear
 
Ok, here is my code. Thanks.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)

On Error GoTo errHandler:

Range("c9").Activate

filesavename = Application.GetSaveAsFilename(Sheet1.Range("C10") &
Sheet1.Range("C7"), _
fileFilter:="Microsoft Excel Workbook (*.xls), *.xls")

If filesavename < False Then

Application.DisplayAlerts = False
Dim resp As Long
resp = vbYes
If Dir(filesavename) < "" Then
resp = MsgBox(Prompt:=filesavename & " already exist, overwrite?",
Buttons:=vbYesNo)
End If
If resp = vbYes Then

Application.ScreenUpdating = False
Application.EnableEvents = False
ActiveWorkbook.SaveAs filesavename

Dim myXLS, mypath
Dim myCSV As String
myXLS = ActiveWorkbook.Name
myCSV = Replace(myXLS, ".xls", ".csv")
mypath = ActiveWorkbook.Path
Sheets("Basic").Select

ActiveSheet.Copy
ActiveWorkbook.SaveAs filename:= _
mypath & "\" & myCSV _
, FileFormat:=xlCSV, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
ActiveWorkbook.Close

MsgBox (myCSV & " have been created and saved in the same directory
with " & myXLS)

Sheets("Advance").Select

Application.EnableEvents = True

Application.DisplayAlerts = True
End If
Else
Cancel = True
End If

Cancel = True

errHandler:
Application.EnableEvents = True
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub


Jean-Yves wrote:
Hi,

Without your code, hard to say. Add a copy to your posting.
Regards

Jean-Yves

"broogle" wrote in message
ups.com...
I have a drop down list in my data validation, but everytime I run

my
code, the drop down button will disappear, to get it back I have to
close my excel (not just the current worksheet) and re-run it

again.
Which code is taking control of this button ? Thanks




All times are GMT +1. The time now is 03:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com