What am I doing wrong? I have 4 salesman ID's and the cities they cover in an array called "cities". How do I obtain the Salesman ID based on the city entered in a form, Field-name "city"? I don't know how to search through an array inside of another array.
$cities = array (
0 =>...
I'm checking my form fields for links to other websites, if I find more than two I mark as SPAM. Is there a way to simplify this code? Maybe put all of my form fields in an array and loop through it and just write the preg_match code once? I just don't know how to do it...
I have a webpage with a textbox that displays the users name - which comes from a database that I don't have access to.
I want to display their email address in a textbox below their name.
I have a list of their names and emails in an external javascipt file.
My html fields:
<label...
I have an html Orderform for safety products for our employees, consisting of checkboxes. The user checks whichever items they want. No quantities are involved, it is always just 1 item.
Example:
<input name="Butyl-Gloves" id="Butyl-Gloves" type="checkbox" value="yes">
<label><strong>Butyl...
I modified this from an Internet Search. It tests to see if the user is connected to a company network. It works, but the first time I run it, whether connected to network or not, it takes about 27 seconds - VERY SLOW! Then each time, it is almost instant. Anyway to speed the initial runtime up...
I have an Access Form, my code functions, but needs serious help! I need to assign a group of employees in Department 160 to their own special group with their own Supervisor, based on their employee number that shows up in Me.txtEmpNumber. How can I make this code easy to maintain as it will be...
I need to reference few ranges on a worksheet named Invoice (Invoice), but sometimes its name changes to Invoice 1
How would I allow for either scenario?
Worksheets("Invoice").Range("A1") or Worksheets("Invoice 1").Range("A1")
I tried something like this thinking Invoice is the codename...
Beginner at VBA, I created a button to send data from a worksheet to an online form - a simple timecard
Online Form: 3 checkboxes, 6 textboxes
chkboxJOB1
txtNameJOB1
txtHoursJOB1
chkboxJOB2
txtNameJOB2
txtHoursJOB2
chkboxJOB3
txtNameJOB3
txtHoursJOB3
What I want to do is if the web form is...
I'm responsible for setting-up and giving our Salesman laptops. Should I also give them all of the CD's that come with the computer or should I hold onto everything?
Looking for suggestions. Thanks!
I added 3 other user accounts to allow 4 family members to share a laptop - Windows XP, running Office 97. But only the first (original) user has access to Office. If anyone else logs on, it isn't there!
Any ideas how to make it available to everyone?
I'm stumped!
Is it possible to replace the Small Excel Icon in the top left corner of a given Excel application along with the title "Microsoft Excel" and the file name, and replace with a custom icon and title?
I also want to disable the upper right X button so the application can only be closed from a...
Quick question: If I send my application to another computer, do they have to manually go into vba and reference Word for it to work on their machine?
Thanks
P
The following works fine from Excel with a macro button but how do I modify it to work from a cmd button click on a user form, assuming the button name is cmdButton1?
Private Sub OpenWordDoc()
Dim wdApp As Word.Application, wdDoc As Word.Document
On Error Resume Next
Set wdApp = GetObject(...
I can open Excel and Word Documents from the following routine but I don't know how to open a pdf file. Any help?
Sub OpenFile()
Dim fn As Variant
ChDir "C:\Program Files\FolderName"
fn = Application.GetOpenFilename("All files,*.*,Excel-files,*.xls,Word Files,*.doc,PDF Files,*.pdf,", _...
I have a userform with buttons that open up different workbooks, with the following macros. Could someone show me an example of how to combine them all into one macro for better code efficiency? Or is this the way to do it? I have several buttons similar to this on the form.
Private Sub...
Below is my code to select and open Excel files. Can someone modify it to include showing Word documents and be able to open them as well? I added this: "Word Documents (*.doc),*.doc," which showed the Word files, but I got an error message when I tried to open the Word documents.
Sub ()
Dim...
Can someone tell a novice with no programming skills how to open a non-microsoft program from a Macro Button in Excel?
So I click on a button and it runs the program...
C:\Program Files\Any Program.exe
Internet search mentions Shell, but that means nothing to me.
Thanks
I have a form with several text boxes and I'm using the following code for validation, which seems to work fine.
If txtName.Text= "" Then _
MsgBox "You must enter a name."
If txtCity.Text= "" Then _
MsgBox "You must enter a city."
...
Problem is if someone forgets to enter...
I have a list box and a button, both disabled. I don't want them enabled until a selection has been made from another List box. How do I accomplish this?
I know how to do it from an Option button:
Private Sub optNo_Change()
If optNo = True Then
cmdButton1.Enabled = True...
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.