• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA Coding in Excel- Macro vs Non-Macro

treinhardt

New Member
Okay.. So I may sound stupid here so sorry in advance if this is a dumb question.


I have written the below code into my excel file. I had a similiar file where I had similar code and was able to save the file as a .xls and not a .xlsm (macro based). This file with this code is requiring me to save it as a macro based workbook. Is there a way to have this code in a file and not have the file be macro based? The users of this file are probably not tech savy enough to remember to press enable macros when they open it so I am trying to avoid having it as .xlsm


Any input would be greatly appreciated!


Thanks


Tyler


Sub ComboBox7_Change()


If ComboBox7.Value = "SSG" Then

ComboBox6.Visible = True

Label1.Visible = True

Else

ComboBox6.Visible = False

Label1.Visible = False

End If


End Sub
 
Hi, treinhardt!


I'm afraid that if the workbook doesn't allow macros (e.g., .xlsx) you can't have that code because Excel has no place to store it withing the file. File types that allow macros are .xls (versions up to 2003), .xlsm, .xlsb (2007+).


You have a workaround, a little tricky but it works. Give a look to this comment and then check all the topic:

http://chandoo.org/forums/topic/user-form-via-qat#post-28628


Regards!
 
Back
Top