Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do i add an drop down arrow to a cell | Excel Discussion (Misc queries) | |||
Excel drop down arrow | Excel Discussion (Misc queries) | |||
Drop Down Arrow | Excel Discussion (Misc queries) | |||
Show Drop Down Arrow | New Users to Excel | |||
how to make dropdown arrow disappear in vba | Excel Worksheet Functions |