121 Topics

Member Avatar for
Member Avatar for Tensigh

Hello, The code below works almost perfectly except for two flaws: 1. It provides the full name of the file (workbook.xls) instead of just "workbook" 2. If there is more than 1 worksheet then the loop appends the previous worksheet to the filename. For example, Workbook1 has 1 worksheet Workbook2 …

Member Avatar for Tensigh
0
394
Member Avatar for Madiya122

I am trying to insert records in a SQL table from Excel sheet with VBA code. Data contains of a range with all the rows to be inserted. I am using below code for the same. Insert INTO [odbc;Driver={SQL Server};Server=myserver;Database=mydb;Uid=abc;PWD=abc].DPR Select * FROM [TempRange] I am getting error as above. …

Member Avatar for Ancient Dragon
0
366
Member Avatar for D Mac Gregor

Hi I need to turn off the printing of hidden text in my vb6 program so I have inserted options.PrintHiddenText = False after opening the file in VBA. However it gives me an error 438 which I do not seem to be able to circumvent. The section of the code …

Member Avatar for shubham05
0
365
Member Avatar for dw85745

I've been coding since 1966 and have seen a number of languages come and go and also held up as "THE" language. When Microsoft came out with Visual Basic 3/4/5/6 (Classic NOT Net), and with VBA as part of their office suite, I jumped on it and never looked back …

Member Avatar for Reverend Jim
0
371
Member Avatar for PerplexedB

I have this routine that works in outlook 2010 but not in outlook 2013 (365). ` Public Sub readTextFile(oFolder As eFolder) If oFolder = NotSupported Then Exit Sub If oFolder = Inbox Then ActiveExplorer.CurrentView = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Views("MgInbox") Else ActiveExplorer.CurrentView = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderSentMail).Views("MgSentMail") End If Dim oTV As Outlook.TableView Set oTV = ActiveExplorer.CurrentView …

Member Avatar for PerplexedB
0
381
Member Avatar for R.M.

Hi I need help with something, I really don't know how to do this, but how would I add these questions in to VBA? could somebody tell me for atleast one. The net take-home income and other values are calculated as follows: 1) Calculate CPP and EI If annual income …

Member Avatar for Mr.M
0
273
Member Avatar for azapovjednik

Hello, can anyone provide me with some sample code? VBA access. I need an insert into statement where form.control.value = some_column and another.form.control.combobox.value = some_column can anyone help? thanks

0
106
Member Avatar for jkvt

Hi, I have a VBA script that places WinForm dropdown boxes (xlDropDown) into an excel workbook dynamically. For some reason, on the 17th box (called "INCL" & i + 1 in the code below), the data type of the placed shape becomes msoAutoShape instead of msoFormControl. All of the following …

Member Avatar for Stuugie
0
482
Member Avatar for fourty

How can i copy data from a named range in a different worksheet and paste it to another worksheet all done without activating both sheet. With all code just behind a form button If i try to use the statement **application.goto reference:="x"** where x is the named range but this …

Member Avatar for Stuugie
0
6K
Member Avatar for ABSOR

I have a text file that I open and attempt to read the individual lines. I have used the same code before on other files with no problem, but for some reason, this particular file is strange. When I do the following command; Line Input #1, read_string the string read_string …

0
149
Member Avatar for DGULLIVER

Good Afternoon, I have 2 senarios to which I need some clarification. I have an Access 2010 frontend with linked tables to mySQL using ODBC. Senario 1: I need to add a few fields to the main table and the software is used 24/7 if I add new fields will …

0
133
Member Avatar for teppuus

Hello, I am trying to write a macro for Excel 2003 that will allow me to search for two words in Sheet1, copy all the data below those words, and then paste that data in Sheet2. That part I can get to work. My problem is that I have multiple …

Member Avatar for PerplexedB
0
404
Member Avatar for DGULLIVER

Hi Everyone, Been a few years since I had to post anything here so I'm glad to be back. I've been asked to do a report to show vouchers that have been issued and presented for July (this year and last year). I have done this SQL: SELECT tblOutlet.OL_NAME, Format([VI_TRANSACTION_DATE_TIME],"mmmm …

Member Avatar for BitBlt
0
262
Member Avatar for Klahr_R

A simple timer for Excel VBA Excel VBA does not have a timer control. The alternative is to use the Timer() Function, and that leaves much to be desired. This code should be placed in a code module. My need was to tend to an abandoned program that was waiting …

Member Avatar for Bloodseeker
0
3K
Member Avatar for Mireya B.

Hello, I am using VBA userform in MS Excel to insert data for database purpose. When I tested it for the first time, it was running okay. But after I saved it and used it again to insert the real data, it happens to repeat/duplicate the data to multiple times …

Member Avatar for Stuugie
0
312
Member Avatar for bruce.feist

Situation: My VBA program compiles, but fails at runtime when I try to access a specific method. It doesn't seem to matter whether I set the method up as a function or a property get. Here is the code fragment which calls the method: ****** Function roots() As Variant ' …

Member Avatar for WetCoastLife
0
408
Member Avatar for geraldike

Good day pals. please i need a VBA code that could make ms excel automaticly tell the maximum point of a curve in a chart. Secondly, another code that would make it automaticly tell the Y-value of the point of interception i.e when two series or range of values are …

Member Avatar for ddanbe
0
174
Member Avatar for burnweb

Hi, Im trying to make an order for an invoice that will take in some details like name, number and have an array of product details like price, qty. It uses variables used in class mods. See if you can make sense of this. Sub webservicetest() Dim NewOrder As New …

Member Avatar for burnweb
0
207
Member Avatar for fashxfreak

Hi ! I have a column of 'City', now I want to compare the value of each cell of 'City' against the column 'City_Check'; the cell where the value matches, pick the value of 'City_ID' column & replace the city name with that ID in the 'City column'. * The …

Member Avatar for urtrivedi
0
259
Member Avatar for Chan2013

Hello, How do I return the value of a custom property in Word 2007 using VBA? Depending on the custom property, I also need to automatically check a checkbox using VBA. Thanks!

Member Avatar for Chan2013
0
305
Member Avatar for katabullet

i have created two forms and two controls, form1 has a button, form two has label. now i wanted the caption of my label to change after clicking on my button, but i just can not call in the control "label" into my button click event because there are from …

Member Avatar for rishif2
0
181
Member Avatar for mgunia

Hello, I want to re-arrange my existing macros in the excel file. I have a macro which goes to the specified sheet and checks column R if there are commas. If it finds the commas it replaces it to dots. Column R is called Email. But in some of documents …

Member Avatar for mgunia
0
334
Member Avatar for mgunia

Hello. I would like to ask for a help. I deal with excel spread sheets and very often I need to amend specific column. The whole steps look like this: Step 1. Find the column name, Step 2. Mark the all populated rows in this column, Step 3. Proceed with …

0
129
Member Avatar for jealii.jealii

I have a volunteer database and having trouble with genuine password protections. I have a "delete" button with this current code under Build Event: Private Sub delete_Click() On Error GoTo Err_cmdDelete_Click DoCmd.SetWarnings False If MsgBox("Delete this VounteerRecord. Are you sure?", vbQuestion + vbYesNo + vbDefaultButton2, "Delete?") = vbYes Then DoCmd.RunCommand …

Member Avatar for Begginnerdev
0
2K
Member Avatar for ImZick

Im using VBA build inside excel is there a way to find if ComboBox has a value? for example i have 80 ComboBox and i want to check if they have a value like "A", "B", "C" and "D" and if the value is blank like "" then stop the …

Member Avatar for ImZick
0
181
Member Avatar for DeanMSands3

I have a calculated field that takes the ID field of a table and pads it with leading zeroes. So far, I've gotten this to work: `String$(4-Len(Trim$(Str$([ID]))),"0") & Trim$(Str$([ID]))` Broken down, it takes the ID field, and string-ifies it. For some reason, this pads it with a space, hence the …

Member Avatar for adam_k
0
770
Member Avatar for chris.italia.31

Hello, I would like my Excel program to print the daily report on a remote printer connnected to Internet through a remote PC. Please help me with a solution. I'm thinking of using Google Print but any other solution is welcome. My best wishes for this New Year ! Cheers, …

Member Avatar for Ancient Dragon
0
84
Member Avatar for Behseini

using MS Excel 2007, and VBA I have two combobox.The first combobox has three items as:{One, Tow, Three} now I would like to load the second combobox based on what user select in combobox1. For example if user select One in the from combobox1 then namebox1 will populate to combox2 …

Member Avatar for AndreRet
0
178
Member Avatar for rumanoid

I am making a program for school where the user has to choose a chapter to learn. when the user has choosen one i want to use a text file where all the words are in: for example In the program you choose chapter 5 then the program has to …

Member Avatar for Reverend Jim
0
349
Member Avatar for ashvyas

I want 1 dialog box which is having a login username and Password field. ANd it must have 12 buttons. whenever i click on any button, it must open 1 Excel sheet associated with it. Just want 1 skeleton code.

Member Avatar for kRod
0
164

The End.