We are not asking for your all data, you can send some sample data with your Code
Regards Rajan verma +91 7838100659 [IM-Gtalk] From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On Behalf Of Burbonizer Sent: 17 May 2012 8:32 To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ VBA If statement I can not do that, the file is nearly 200mb in size. The code that i have attached is all that i can really show. On Thursday, May 17, 2012 2:13:34 PM UTC+1, Rajan_Verma wrote: Please attach your sample file Regards Rajan verma +91 7838100659 [IM-Gtalk] From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On Behalf Of Burbonizer Sent: 17 May 2012 3:53 To: excel-macros@googlegroups.com Subject: $$Excel-Macros$$ VBA If statement Hi All, i currently have a form that has button's on it which are enabled via code if a field contains certain data. I now want another button to become visible if a field contains some text and another field contains some text. basically in english terms i need to following but can not get the syntax to work. The red text is what i need to add. If me.active_statuts = "IH" then Me.Input1.SetFocus Me.Button_PO1.Enabled = False Me.Button_VD.Enabled = False Me.Button_SP.Enabled = False Me.Command107.Enabled = False Me.Button_DO.Enabled = False Me.Button_H.Enabled = False Me.Button_R.Enabled = False Me.Button_TS.Enabled = False Me.Button_IH.Enabled = False Me.Button_ALS.Enabled = False Me.Button_AL.Enabled = False Me.Button_AL1.Enabled = False Me.Button_Awaiting_Inspection.Enabled = True Me.Button_PS.Enabled = False Me.Button_AIAP.Enabled = False Me.Button_AIOH.Enabled = False Me.Button_OH.Enabled = True Me.Button_AP.Enabled = True Me.Button_C.Enabled = False Me.Button_AD.Enabled = False Me.Button_PO2.Enabled = False Me.Button_AL1PO.Enabled = False Me.Button_EM.Enabled = False Me.Command106.Visible = False Me.Moved_to_Vehicles.Visible = false End If if me.location = "Specialist Production" then me.Moved_to_Vehicles.Visible = true end if But i dont want the button to appear if only one of these fields contains the correct data. I need both to be true to do my bit. Any help would be great. Thanks -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ---------------------------------------------------------------------------- -------------------------- To post to this group, send email to excel-macros@googlegroups.com -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ---------------------------------------------------------------------------- -------------------------- To post to this group, send email to excel-macros@googlegroups.com -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com