Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub PLabels_Click()
Sheets("PrintLabels").Select ActiveSheet.Calculate 'event procedure CloseExcelHLS ' command button PrintLabels.Export.Enabled = True 'command button PrintLabels.CloseExcelExport.Enabled = False End Sub The above is triggered from another sheet called PList. CloseExcelHLS is an event and once it completes running the code stops at: PrintLabels.Export.Enabled = True Anyone got a solution for this? Thank you if you can be of help. Pat |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It is hard to tell from the code you have posted. My only suggestion is that
if you have cmd buttons that you are trying to manipulate and it won't work try being more explicit in your declarations. Reference the sheet or form that the button is on prior to referencing the button... Something like Sheet1.CommandButton1.enabled = false HTH "Pat" wrote: Private Sub PLabels_Click() Sheets("PrintLabels").Select ActiveSheet.Calculate 'event procedure CloseExcelHLS ' command button PrintLabels.Export.Enabled = True 'command button PrintLabels.CloseExcelExport.Enabled = False End Sub The above is triggered from another sheet called PList. CloseExcelHLS is an event and once it completes running the code stops at: PrintLabels.Export.Enabled = True Anyone got a solution for this? Thank you if you can be of help. Pat |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Jim,
That's exactly what I am currently doing. PrintLabels.Export.Enabled = True PrintLabels = sheet name Export = commandbutton name "Jim Thomlinson" wrote in message ... It is hard to tell from the code you have posted. My only suggestion is that if you have cmd buttons that you are trying to manipulate and it won't work try being more explicit in your declarations. Reference the sheet or form that the button is on prior to referencing the button... Something like Sheet1.CommandButton1.enabled = false HTH "Pat" wrote: Private Sub PLabels_Click() Sheets("PrintLabels").Select ActiveSheet.Calculate 'event procedure CloseExcelHLS ' command button PrintLabels.Export.Enabled = True 'command button PrintLabels.CloseExcelExport.Enabled = False End Sub The above is triggered from another sheet called PList. CloseExcelHLS is an event and once it completes running the code stops at: PrintLabels.Export.Enabled = True Anyone got a solution for this? Thank you if you can be of help. Pat |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry. You have not premised your objects with the standard 3 letter
abbreviations like sht, wks or cmd so it was a little hard to tell. What is your event code? Perhaps you need to resolve the declarations to VBAProject.PrintLabels.Export.Enabled = True I might be worried about the object names PrintLabels or Export being reserved words. Try changing them to shtPrintLabels and cmdExport to resolve any potential conflicts there... HTH "Pat" wrote: Hi Jim, That's exactly what I am currently doing. PrintLabels.Export.Enabled = True PrintLabels = sheet name Export = commandbutton name "Jim Thomlinson" wrote in message ... It is hard to tell from the code you have posted. My only suggestion is that if you have cmd buttons that you are trying to manipulate and it won't work try being more explicit in your declarations. Reference the sheet or form that the button is on prior to referencing the button... Something like Sheet1.CommandButton1.enabled = false HTH "Pat" wrote: Private Sub PLabels_Click() Sheets("PrintLabels").Select ActiveSheet.Calculate 'event procedure CloseExcelHLS ' command button PrintLabels.Export.Enabled = True 'command button PrintLabels.CloseExcelExport.Enabled = False End Sub The above is triggered from another sheet called PList. CloseExcelHLS is an event and once it completes running the code stops at: PrintLabels.Export.Enabled = True Anyone got a solution for this? Thank you if you can be of help. Pat |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yup. Looks like export is a reserved word... I typed export into my VBE code
window as a stand alone line and it capitalized itself when I left the line. Usually that is a good indications that the word is reserved and should not be used... HTH "Jim Thomlinson" wrote: Sorry. You have not premised your objects with the standard 3 letter abbreviations like sht, wks or cmd so it was a little hard to tell. What is your event code? Perhaps you need to resolve the declarations to VBAProject.PrintLabels.Export.Enabled = True I might be worried about the object names PrintLabels or Export being reserved words. Try changing them to shtPrintLabels and cmdExport to resolve any potential conflicts there... HTH "Pat" wrote: Hi Jim, That's exactly what I am currently doing. PrintLabels.Export.Enabled = True PrintLabels = sheet name Export = commandbutton name "Jim Thomlinson" wrote in message ... It is hard to tell from the code you have posted. My only suggestion is that if you have cmd buttons that you are trying to manipulate and it won't work try being more explicit in your declarations. Reference the sheet or form that the button is on prior to referencing the button... Something like Sheet1.CommandButton1.enabled = false HTH "Pat" wrote: Private Sub PLabels_Click() Sheets("PrintLabels").Select ActiveSheet.Calculate 'event procedure CloseExcelHLS ' command button PrintLabels.Export.Enabled = True 'command button PrintLabels.CloseExcelExport.Enabled = False End Sub The above is triggered from another sheet called PList. CloseExcelHLS is an event and once it completes running the code stops at: PrintLabels.Export.Enabled = True Anyone got a solution for this? Thank you if you can be of help. Pat |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe
Worksheets("PrintLabels").Export.Enabled = True 'command button Worksheets("PrintLabels").CloseExcelExport.Enabled = False -- HTH RP (remove nothere from the email address if mailing direct) "Pat" wrote in message ... Private Sub PLabels_Click() Sheets("PrintLabels").Select ActiveSheet.Calculate 'event procedure CloseExcelHLS ' command button PrintLabels.Export.Enabled = True 'command button PrintLabels.CloseExcelExport.Enabled = False End Sub The above is triggered from another sheet called PList. CloseExcelHLS is an event and once it completes running the code stops at: PrintLabels.Export.Enabled = True Anyone got a solution for this? Thank you if you can be of help. Pat |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That worked great.
Many thanks gentlemen for your help. Pat "Bob Phillips" wrote in message ... Maybe Worksheets("PrintLabels").Export.Enabled = True 'command button Worksheets("PrintLabels").CloseExcelExport.Enabled = False -- HTH RP (remove nothere from the email address if mailing direct) "Pat" wrote in message ... Private Sub PLabels_Click() Sheets("PrintLabels").Select ActiveSheet.Calculate 'event procedure CloseExcelHLS ' command button PrintLabels.Export.Enabled = True 'command button PrintLabels.CloseExcelExport.Enabled = False End Sub The above is triggered from another sheet called PList. CloseExcelHLS is an event and once it completes running the code stops at: PrintLabels.Export.Enabled = True Anyone got a solution for this? Thank you if you can be of help. Pat |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
HOW TO DO ENABLE ENABLE THE QUERY PARAMETER BUTTON? | Excel Worksheet Functions | |||
CommandButton | Excel Programming | |||
CommandButton | Excel Programming | |||
Commandbutton | Excel Programming | |||
Disabling the enable/disable dialog box with Digital Signature | Excel Programming |