textbox query

I am using a userform to have data transfered to a sheet.  I currently use
the code below to send it to a worksheet but what I would like to have
happen is for it to add the total of the textbox to the total already in the
cell.

R = 3 'or whatever desired row variable
Sheets(2).Cells(R, 5).Value = TextBox4.Text

Any help would be great

Thanks in advance

Greg


0
laptopgb (91)
6/3/2005 12:50:22 PM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
513 Views

Similar Articles

[PageSpeed] 53

With Sheets(2).Cells(R, 5)
    .Value = .Value + CDbl(TextBox4.Text)
End With

-- 
 HTH

Bob Phillips

"Greg B" <laptopgb@ihug.com.au> wrote in message
news:d7pjmh$ch3$1@lust.ihug.co.nz...
> I am using a userform to have data transfered to a sheet.  I currently use
> the code below to send it to a worksheet but what I would like to have
> happen is for it to add the total of the textbox to the total already in
the
> cell.
>
> R = 3 'or whatever desired row variable
> Sheets(2).Cells(R, 5).Value = TextBox4.Text
>
> Any help would be great
>
> Thanks in advance
>
> Greg
>
>


0
phillips1 (803)
6/3/2005 1:11:39 PM
Thank you Bob

Greg
"Bob Phillips" <phillips@tiscali.co.uk> wrote in message
news:%23W9iM3DaFHA.228@TK2MSFTNGP12.phx.gbl...
> With Sheets(2).Cells(R, 5)
>     .Value = .Value + CDbl(TextBox4.Text)
> End With
>
> -- 
>  HTH
>
> Bob Phillips
>
> "Greg B" <laptopgb@ihug.com.au> wrote in message
> news:d7pjmh$ch3$1@lust.ihug.co.nz...
> > I am using a userform to have data transfered to a sheet.  I currently
use
> > the code below to send it to a worksheet but what I would like to have
> > happen is for it to add the total of the textbox to the total already in
> the
> > cell.
> >
> > R = 3 'or whatever desired row variable
> > Sheets(2).Cells(R, 5).Value = TextBox4.Text
> >
> > Any help would be great
> >
> > Thanks in advance
> >
> > Greg
> >
> >
>
>


0
laptopgb (91)
6/3/2005 1:25:54 PM
Reply:

Similar Artilces:

Append Query 02-28-08
I am trying to append data from tblitemline to tblitemlist. I only want to append new records. The unique field is ListID. I want to append 4 fields total. I can't get it to limit it to new records. Any help would be appreciated. Thanks! New on the basis of what criteria.? Whatever that criteria is it should either the primary key (there can be multiples fields involved as the primary key) or Indexed with NO duplicates, (this will work if the criteria is a single field). Once you set the table up that way, the append query will only add "new" records. You can still have a ...

database query/names issue, causing excel to be sluggish
I have an issue with an excel worksheet I've created. WorkbookA has "Names" which are used to define drop-down menus in WorksheetA. These "Names" are defined to reference a WorksheetB (also in WorkbookA) which itself is populated by a database query, pulling from another Excel WorkbookB. The logic is that WorkbookB should not be touched by the User, only an Admin, and Workbook A is used by User. The Names in WorkbookA are to prevent incorrect entries. Now that I've set it up, WorkbookA is moving really sluggish, but if I delete all the Names it speeds up again....

which query is faster, better to use?
There are multiple AdjournmentDates for any given NoticeID in tblNotices_AdjournemntDates. I want the most recent date for each NoticeID. Both of these produce the correct results. Is either one better than the other? SELECT DISTINCT NoticeID, (SELECT TOP 1 AdjournmentDate FROM dbo.tblNotices_AdjournmentDates WHERE NoticeID = A.NoticeID ORDER BY AdjournmentDate DESC) FROM dbo.tblNotices_AdjournmentDates A SELECT NoticeID, AdjournmentDate FROM dbo.tblNotices_AdjournmentDates A WHERE (AdjournmentDate IN (SELECT TOP 1 AdjournmentDate FROM tblNotices_AdjournmentDates WHER...

Load query with outdata until search
I have a form with sub form on it I use this form to search for products we keep in stock with prices, I have a Search text box on the form then i type in the product then hit the search button and it requerys the sub form Only problem i have is when i first load the form it show every product in the subform, so takes a long time to load Is there a way to load the page with out the date then i can type in product i want to search for then it displays the products Simon What about setting the .RecordSource property of that form (?subform) to "" in the OnLoad event,...

query problem 02-11-08
Hi to Everyone I have a table (tblMunka) with the following columns: JobId; PersonalId;AreaId;StartDate;EndDate;ActiveJob I would like to a query which tell me how many personal was in a term in an area. I have a form (frmLetszam) where user can choose start and end dates from a calendar. I've tried with this but the result is not good: HAVING (((tblMunka.StartDate) Between [Forms]![frmLetszam]![cboEndDate] And [Forms]![frmLetszam]![cboEndDate])) OR (((tblMunka.StartDate)<[Forms]! [frmLetszam]![cboStartDate]) AND ((tblMunka.EndDate) Is Not Null)); Please help me! Best regards -- Mes...

Query with Combo Boxes on a Form
I'm using QBF with about six different combo boxes using: [forms]! [formmain]! [combo1] or [forms]![formmain1]![combo1] -like in a VBA book. This is so users can select criteria on a form with the combo boxes, and when they are done, they hit the search button, and it opens up another form based on the query just performed by the combo selection. This worked for about three combo boxes, but when I added another one, it freezes up and opens up a blank page. It's supposed to open the new form based on the query. Is there a better way to do this? Any help would...

LDAP Query #4
im sorry if this post is in the wrong group how can i create an ldap query to get all the users with exchange boxes inside a specific OU this OU might also have OUs indise it with users that hafve mailboxes i want this to be able to create customized address lists Thank you Address Lists cannot be targeted at particular OUs. You need to use some user attribute that's common for users in that OU - like department, location, company name, etc. -- Bharat Suneja MCSE, MCT www.zenprise.com blog: www.suneja.com/blog ----------------------------------------- "Nazgyl" <naz...

Creating a Report using two queries
I have created a chart report (bar chart) using one query. How can I create another single chart showing the results of both queries. One will show the bars of first query data and the other will show bars of the data from second query together in a single chart report. Any suggestions? -- FL This depends on how/if the two queries are related. I would expect the "X" axis values might be related. If so, join the two queries into a single query and graph the new query. -- Duane Hookom Microsoft Access MVP If I have helped you, please help me by donating to UCP http://www...

Any way to capture text in a textbox inside another application?
I need to write an application and need to find a way to "spy" on a textbox in another application. It will work the similar to the spy++ where you indicate that you want to spy on a control in another app, and the program will let you pick the control to spy on. From that point on, all the messages sent to the control will be routed to this program. I am wondering how spy++ does that and is there any sample in MSDN shows how to do that? Thanks Andy Andy, > I need to write an application and need to find a way to "spy" on a textbox > in another application. &...

Complex Update Query in SQl Server 2000
I need to update ACTINDX in UPR40500 for each JOBTITLE in MYTABLE. We have modified the ACTNUMBR in 'MYTABLE' whose segments are contained in GL00100 GL00100 ACTINDX ACTNUMBR_1 ACTNUMBR_2 ACTNUMBR_3 ACTNUMBR_4 ACTNUMBR_5 30562 222 411001 000000 150 350 30563 222 411001 000000 155 355 UPR40500 JOBTITLE ACTINDX 209401 30562 150001 30563 MYTABLE JOBTITLE ACTNUMBR 209401 222-411001-000000-150-350 150001 222-411001-000000-155-355 Sean: If you are storing the account number as a string in my table, an...

Select Query Broken
Does any one know, of the issue in A2k3 With the Query, I was creating some combo list filters, via query's then putting the SQL in a Marco Apply filter. work great then all i sudden, now, when i view the query in normal mode, (NOT Design mode) Its Showing all the fields that are related on the table the query is based on, even though only two fields have been selected. and the show tick is ticked? just for 2, any ideas whats happening here? ive tried repairing and compacting database and also restarting access no luck? On 10 Sep, 16:42, KARL DEWEY <KARLDE...@discussions.microsoft...

Public folders: query regarding the "synchronize now" function
Exchange 2003 SP2 I have a query regarding the "synchronize now" function for public folders. Say I have a public folder called "Bob" with replicas on 3 servers (ServerA, ServerB, ServerC) If I drill down to Folders/Public Folders Select the "BOB" public folder and select the "Status Tab" on say ServerA, I see all 3 replicas listed as expected: If I right click a replica I can select "synchronize now" what does this do exactly? Does it: 1) Push updates out from the replica where you right click and select "synchronize now" ...

Query Button Problem
On my form, I need to put a button to run a query. When using the toolbox in the Design View, I use the Command Button Toolbar, then use MIscellaneous, then Run Query. I select the correct one, and save it to the form. When I try to use it, I get an error message, and it will not work. What is going wrong? Can't figure it out if you don't provide an error message. On Fri, 1 Feb 2008 10:52:00 -0800, Shari <Shari@discussions.microsoft.com> wrote: >On my form, I need to put a button to run a query. When using the toolbox in >the Design View, I use the Command Button To...

criteria for filtering check boxes in a query
I am trying to do a permanent sort for columns using check boxes. I need to know the formula for the criteria box On Wed, 20 Jun 2007 14:54:41 -0700, Desiree wrote: > I am trying to do a permanent sort for columns using check boxes. I need to > know the formula for the criteria box What is "a permanent sort for columns using check boxes". Perhaps your terminology is clear to you, but I think you would do well to re-think and repost your question. -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail On Thu, 21 Jun 2007 15:38:03 -0700, Desir...

adding fields in query
I am trying to add fields in a query to put into a new field. For example; FieldOne, FieldTwo, and FieldThree should equal FieldFour. FieldOne has a value of 1, FieldTwo has a value of 2 and FieldThree has a value of 3. When I try =FieldOne+FieldTwo+FieldThree in FieldFour with the expression builder, it does not add them, it just shoves all their values together. Instead of FieldFour having a value of 6 when I run the query, it gives me a value of 123. I have also tried the "&" instead of "+", and I get the same results. I have tried changing the To...

stop returning column headings from DB query
I put together a query to go against Oracle that returns a block of data to the spreadsheet. Is there an option somewhere to have the "Return Data to Excel" do so without also returning the column headings? I want the data only. thanks - Russ There are 2 places that you can change that setting..... 1)When you return data from MS Query the dialog where you select the location for the data has a Properties button. Click that button UNcheck: Include Field Names.......click [OK] Continue selecting the query destination OR 2)After the data has been pulled from Oracle Right-click...

Tranform Pivot Query?
I hv 2 tables with structure as below: [Empl] ID Name 1 Mr A 2 Mr B 3 Mr C 4 Mr D 5 Mr E [Empl_Tran] TrID Empl_ID Date Code 1 1 10/11/2009 SL 2 1 10/11/2009 TR 3 1 11/11/2009 W 4 1 12/11/2009 W 5 1 12/11/2009 TR 6 2 10/11/2009 SL 7 2 10/11/2009 TR 8 2 11/11/2009 W 9 2 12/11/2009 W 10 2 12/11/2009 TR 11 3 10/11/2009 SL 12 3 10/11...

Web query again
Hello, I looked on MSDN about web queries with VBA. But the code I took from there doesn't work. Dim BaseURL As String BaseURL = "some URL" Const StartDate As Date = #11/2/2004#, EndDate As Date = #4/20/2005# Dim d As Date For d = StartDate To EndDate Dim newSheet As New Excel.Worksheet Set newSheet = Worksheets.Add With newSheet .Name = Replace(CStr(d), "/", ".") Call .Activate End With 'MsgBox ("URL;" & BaseURL) 'Next line gives an error 'Run-time error '5': 'Invalid ...

emailing query window type result messages
I'm creating some backup procedures. While testing them in the query window, I'll get messages like this: 100 percent processed. Processed 0 pages for database 'Caser', file 'Caser_Log' on file 1. BACKUP LOG successfully processed 0 pages in 0.097 seconds (0.000 MB/sec). The backup set on file 1 is valid. I knonw how to do this: BACKUP LOG [Caser] TO DISK = @BackupLocationAndName WITH NOFORMAT, NOINIT, NAME = @BackupName, SKIP, REWIND, NOUNLOAD, STATS = 10 SET @Err = @@ERROR IF @Err <> 0 BEGIN EXECUTE msdb.dbo.sp_notify_operator @name = ...

data base query
I have a workbook with 2 work sheets. Eacch contains data from a database query( 2 different databases) Is it possible to create a pivot table from the 2 sheets ? ...

Exporting a Query to Excel
Hi, I have a query of Purchase Oders, sorted by month, for a particular business unit and was wondering if there was a way to export the data to one excel workbook, but to have 12 tabs of monthly data instead of having to separate it out manually. thanks -- C. Williamson Here is some code that I wrote for a poster a few months ago that will do this type of export. You'll need to modify the code so that it will loop through a list of months instead of a list of managers. Post back with questions (and with more details) if you have problems. Generic code to create a temporary qu...

SQL Server 2005: SELECT INTO & pass-through query
Hi I often use pass-throgh queries to get data from external sources - something like following example: ---------------------------------------------- Use MyDaytabase -- Declaring variables DECLARE @SQLString varchar(max) DECLARE @OpenQuery varchar(max) DECLARE @LinkedServer varchar(max) -- Declaring table variables DECLARE @Q1 TABLE( id INTEGER, Field1 DATETIME, Field2 VARCHAR(50), Field3 INTEGER) -- Setting variables SET @LinkedServer = 'MyLinkedServer' SET @OpenQuery = 'SELECT * FROM OPENQUERY(' + @LinkedServer +',''' -- Co...

MS "Query", MS Excel not playing nicely
Using Excel 2000 (9.0.2720), Clicking Data, Get External Data, New Database Query. Not working. Says, "Waiting for data to be returned from Microsoft Query" in the status bar, then pops up a dialog that says, "Microsoft Query could not be started because it isn't installed. You can install Query by running the installation programyou used to install Office or Excel. The Query option is in the Office Tools category." But I *DID* install Query!!! If I set MS Query (in Control Panel, Add/Remove Programs, MS Office) to "install on 1st use", then Excel knows it n...

how to make impossible to select content of textbox?
Hi, i need two textboxes, one for entering and another for confirming an emailaddress. What i want is to make impossible to select the emailaddress in the first textbox in order not to be able to copy it in the second textbox. I'm sure it's possible to do that asp.net (ajax?), but how? Thanks Luc On Mar 1, 10:59=A0pm, "Luc" <qc...@qscqs.fr> wrote: > Hi, > > i need two textboxes, one for entering and another for confirming an > emailaddress. > > What i want is to make impossible to select the emailaddress in the first > t...

Access97 Queries connecting via ODBC to Sybase SQLanywhere backend
I have a Access97 frontend database and it links tables and queries to a Sybase SQLAnywhere backend database. I have imported all the tables from the SQLAnywhere into a Access97 database. I have changed the linked relationship in the tables section to point to the Access97 backend now and not the Sybase backend. Problem is I have SQL queries written in the Access 97 frontend that still try to access Sybase via ODBC. How do I change these queries to access the new Backend. Jamie Network Administrator If the queries were originally written using linked tables, they should still work. Ho...