Answer Questions
powderhawk Help with a formula
I need to write a formula for Excel that calculates the amount of fuel that is in a tank. Here is what it is for. We have cylinder tanks that lay horizontaly. Each month we put a dipstick into the tank to measure how many inches of fuel is left in the tank. I need a formula that will take that and calculate it into gallons. Here is the formula I have to work with. / -1 r - h \ V = L * | [ r^2 * cos (--------)] - [sqrt(2rh - h^2) * (r - h)] | \ r / Any Help is appreciated (BTW I am not the best at math so if possible an explination of this formula would be greatly appreciated) Tiger, forgot ...Show All
jim rozak I need Help creating a specific VBA Macro for my Excel Spreadsheet
Hello: EXCEL. I am trying to find the best way to create either a formula or a macro/button for the following issue: I have a spreadsheet, which has a specific daily total on cell G19 (Ex G19 = 2,000,000) cells G21 (Ex. -300,000)and G23(Ex. +300,000) are use to enter specific amouts that will either add or subtract from G19. The answer to this addition/ subtration is recorder automatically to cell G25. EX. 2,000,000 -300,000 = 1,700,000 The result on cell G25 (1,700,000) will be the beginning balance for the following day. My problem is, that when I open the spreadsheet on a daily basis, I have to Manually change the amount on G19 to the new Begining balance (Ex. G19=2,000,000 change to G19=1,700,000) and ...Show All
David N.4117 Size Form to fit user resolution
I have several multi-user Access applications. After much time-consuming research I have not been able to find anything that works on this question: How can I get my forms to automatically fit the USER'S screen with their set resolution with the OnLoad event of a form I have already tried me.height, me.width with no success. Anyone have any other suggestions Any help would be greatly appreciated. Thanks! What happens when you set Me.Height and Me.Width (or just Me.Size) to your desired size I ask because it sounds like you are on the right track to se the Height and Width properties of the form either within its constructor (but after the call to InitializeComponents) or within the h ...Show All
Evan Mulawski [Excel] How to convert Excel to jpg, gif image?
How to convert MS Excel to jpg or gif and paste/insert to MS Word thank you very much Jon Peltier wrote: I don't know why everyone thinks it's so hard to copy an image of a region and paste it elsewhere. I guess I both misunderstood his problem and what the CopyPicture function is capable of. I was under the impression that he wanted to copy an image of an entire document , rather than just a single region -- simple enough, but I was also working under the misconception that CopyPicture wouldn't be able to grab a screenshot of an area bigger than what could be displayed (don't know why I thought this...) You're absolutely right! I doubt very much you can d ...Show All
Milzit Removing "Trial Version" from Web Components on SharePoint web sites
Hello, I would like to remove the "Trial Version" as stated above. I used CSS but then other part disappear as well so this is not an option. Then I tried JavaScript but wasn't working either. Question: is it somehow possible to do it with JavaScript (I have only limited scripting capabilities). Or can I directly access the template that creates the different sharepoint web sites for my purposes I would appreciate advice on this matter and thank you for your attention. Regards Christian ...Show All
minkee.s Projects, objects & modules
I started learning VBA in MS Word yesterday. I have some programming experience in C++ and Java. I am trying to understand how the environment is structured and what Projects, Objects and Modules represent. For example I recorded a few macros using the macro recorder and then opened the VB Editor to see what was created. I notice that under "Project" are 3 folders. One is named "Microsoft Word Objects". Within this folder is what looks like a file named "This Document". What does "Project" represent What does "This Document" represent What is the difference between "This Document" and the "Project&q ...Show All
swapna_n Run Time Error 1004 On Long Running Stored Procedure
I am encountering a "Run Time Error 1004" when I attempt to execute a stored procedure from within Excel VBA. The stored procedure takes about a minute to return results. I have tested with shorter running procedures successfully, so it must have something to do with the amount of time it takes to return results. The For loop is never executed because no results return. The error occurs on the last command where I attempt to set the column names in the spreadsheet equal to the column names from the recordset. Obviously errors because no recordset exists. As you can see I have set the timeout for the command to indefinite. I have also unsuccessfully tried a DoEvents after the command has been executed. Suggestions If ...Show All
Steve Eckhardt Copy problem in excel, please help me.
Hi everyone, Now, i'm having a small problem with excel. Here i have 2 cells with content as following: cell1: world cell2: hello I want to create a cell2 with content as following cell 2: hello world I have used copy and paste functions in VBA but don't have result as i expect I only received a result as following cell2: world Please help me. Can you show us the code on how you do the copy and paste Hi You can work directly with the cells in VBA. If your sheet is "Sheet1" and your cells are A1 and A2 the below code would give the expected result. Worksheets("Sheet1").Cells(2, 1).Value = Worksheets("Sheet1").Cells(2, 1).Value & &quo ...Show All
kinny_k Focusing on textbox (in PPT)(use VB?)
Hi everyone....any help would be great. I have a one-slide Powerpoint that has a textbox (from the "control" toolbox, not the normal textbox) to allow for text to be entered during a presentation (or slideshow view). The problem is that you have to click on the box to enter the text. Is there a way to have the cursor go right to the box as soon as the slide comes up So when the slide comes up and I start typing, it will go right in the box without me having to click on it first I wasn't sure if this could be done with VB in PPT (which I think is VB 6.3). Thanks! Anyone have any ideas please ...Show All
CetinBasoz use inputbox to choose cells for plots in excel
Hi all, The below code would I like to change so I can use the inputbox arrays 'usr_choice_x' and 'usr_choice_y' (instead of the range "A68:B89" as it is now) for the plot. How do I do that Grateful for ideas usr_choice_x = Application.InputBox(Prompt:="Select x cells ", Type:=64) usr_choice_y = Application.InputBox(Prompt:="Select y cells ", Type:=64) Charts.Add ActiveChart.ChartType = xlXYScatterSmoothNoMarkers ActiveChart.SetSourceData Source:=Sheets("MDO_061013_LHS_HP").Range( _ "A68:B89"), PlotBy:=xlColumns ActiveChart.Location Where:=xlLocationAsObject, Name:= _ "MDO_061013_LHS_HP" With ActiveChart .HasTitle = False .Axes(xlCategory, xlP ...Show All
tayoga Get Excel Sheet Names
Hi: I am trying to connect an Excel file and get all sheet names in the file. When using ADO.Net, the sheet names contain letters "$, or ' " around the sheet name, not getting the exact sheet name. I wonder why. I am also trying to get sheet names by using Excel as a Com object in VB.Net, like: myExcel =CreateObject("Excel.Application") myWorkBook=myExcel.WorkBook.Open("my Excel File") For i = 1 to myWorkBook.Sheets.Count myTableName(i) = myWorkBook.Sheets.Item(i).ToString Next But the code does not work. Does anyone know how Thanks. good day sir, can you give me the declarations that you use in "myExcel" and "myWorkbook" because i really ...Show All
DCollins loop problem
Hi! I have a problem with a loop. I want to search the entire spreadsheet for a cell that contains the text “Sec type”. However there are two rows that I do not want to search. These to rows are: segment.row and secID.row. These two rows each contains a cell with the text “Sec type”. Thus, I want to search for any additional cells with that text. If an additional cell containing the text “Sec type” is found I want to store the address of that cell in the variable c. If no additional cell is found I want to set c = Nothing or something that indicates that no additional cells were found. With Range("b1:aa5000") Set c = Worksheets("Berakning").Cells.Find("Sec type", LookIn:=xlValues) If Not ...Show All
BonnieB Left, Mid and Right functions not working on Office 2003
Hi, VB in office 2003 does not seem to recognise the Left, Mid and Right functions. I've been using the code below to convert dates in excel like "20060123" to an actual date (i.e. 23/01/2006) in previous versions with no problem. Sub DCDecToKhanya() Dim mycell For Each mycell In Selection 'For each cell in the range selected mycell = DateValue(Left(mycell, 4) & "/" & Mid(mycell, 5, 2) & "/" & Right(mycell, 2)) 'Convert the contents to a date Next mycell End Sub I get a Compile Error " Can't find project or library" Thanks Hi, Please check "Tools > References" in VBA editor for any missing dlls. bvr ...Show All
dophine vlookup
Hello can anyone help me with how to write the excel vlookup function in vba the function in excel looks like this VLOOKUP(O2,'[Consolidated list of supplier.xls]Sheet3'!$A$5:$F$218,6,FALSE) how can i get something similar working in a macro. thanks namrata also, when i replace the code as Application.WorksheetFunction.VLookup(LookupValue, TableArray, RangeLookup, ColIndex) the error changes to "can not find the vlookup function in the worksheetfunction class" but if i write Application.VLookup(LookupValue, TableArray, RangeLookup, ColIndex) the error changes to "1004:application defined or object defined error" any clue .... i have fully qualified the range also as follow ...Show All
Krutika DOS Command Question
Im sure this is easier than what im trying to do, but any help would be great. The following code is from my .bat file, the problem is I have numerous file names that change on a daily basis, that I know I can programically change. Im not sure how I can send the dos command though from MS Access/VB. I don't want to use a .bat due to having to change file names. The following is what is in my .bat and the BOLD is what changes. shell = (dir *_* /b > e:\cginst\collect\collect.txt) move *_* e:\cginst\ssfiles) cd e:\cginst\collect\06 dir 2800_* /b > e:\cginst\collect\2800.txt move 2800_*.txt e:\cginst\ssfiles dir *_* /b > e:\cginst\collect\run00.txt move *_* e:\cginst\ssfiles cd e:\cginst\collect\06\Dec dir 2100_* /b > e:\cgin ...Show All
