Hi,
I have a long code behind a command button. Now, when I try to run it I'll get an error tag which says that code is too long. How can i solve this problem? It isvery essential that all that code is behind this command button.
Thanks!
-episode80
How can the printing option from the toolbar (file->print) or via the quicklaunch button be disabled?
I have one optionbutton in the worksheet (with specified printig area) for printing purposes and I want the button to be the only way to do the printing.
Thanks!
Hi,
I have an excel document which has two sheets.
Now, I want to set it so that when the user wants to take a print the result would always be specified area from the sheet2. How that can be done?
Thanks!
Sean,
I changeg the keypress code as follwing:
Private Sub Textbox10_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Dim strIn As String
Dim sDecSep As String
sDecSep = LoadLocaleValue(LOCALE_SDECIMAL)
strIn = Chr(KeyAscii)
If strIn = "." Or strIn = "," Then...
Sean,
I have still some problems.
Now I have this code in the module:
Option Explicit
Private Const LOCALE_SDECIMAL = &HE ' decimal separator
Private Const LOCALE_STHOUSAND = &HF ' thousand separator
Private Declare Function GetLocaleInfo Lib "kernel32" Alias...
Sean,
I have had this same problem. Now because I'm a newbie in VB I started to wonder where I should place magic code :)
I have two textboxes where the user can input values and there the code is needed.
So the question is where I should place your code so that it applies to these to...
I have two textboxes where the user inputs numbers.
for example if the user inputs 1,3 to the first textbox
and 1.3 to the another textbox the program tries to multiply these two numbers but returns an error because of the different decimal signs.
What would be the proper code to make the...
I have this program (uses forms) which works just fine, but I also want make sure that the progrma works when the user uses commas, dots or both as decimals in the program while he/she inputs number.
Is it possible to make excel understand this?
At the moment if I input for example 1,3 and 1.3...
Now I have this code. Not the cancel button has no effect but if the user saves the document with the same name there will be a prompt which asks that are you sure that you want overwrite it. Now, if you press there no or cancel button an error will happen.
How can I get rid of that prompt box...
At the moment I have this code:
fileSaveName = Application.GetSaveAsFilename( _
fileFilter:="Text Files (*.xls), *.xls")
ActiveWorkbook.SaveAs
which works fine if you click OK, but if you click cancel
the programs returns an error.
How to get rid of that?
Thanks in advance!
I want to create save&load functions behind commandbuttons.
What would be the saveas code that prompts the SaveAs window and saves the current excel document. And it would be good if save format would automatically be xls format and the suggested filename "Project".
And how would the load code...
I think this is quite easy question but I'm a beginner so help me please...
So, I just want to export data from forms (for example from textboxes) to normal worksheet cells.
What is the code to do that in VB?
Thank you! :)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.