Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. davefish

    Looping through a word doc to delete rows

    @Andrzejek @strongm Great job! Thank you both for your suggestion it worked straight away
  2. davefish

    Looping through a word doc to delete rows

    I have a word table that is populated by Excel VBA as shown below:- wordDoc.Tables(4).Cell(2, 1).Range.Text = " " & Range("O19").Value & " Way Flush Mounting, Programmable Alarm Annunciator." 'Product code wordDoc.Tables(4).Cell(5, 1).Range.Text = Range("O25").Value 'Window size...
  3. davefish

    Excel Sheet view zooms in slightly when running code

    Hi, I have a workbook that builds a graphic based on cell values. Each graphic is a .png in the same folder as the Excel file and this works okay. However, when the code is first initiated, the sheets view zooms in about 5% then resets and I can't find out why? I'm am using Excel O365 on...
  4. davefish

    Late binding

    Hi Skipo, I tried changing the code as shown below, but got an error on the highlighted point. unfortunately I don't have immediate access to a machine with Excel 2016, so can't pursue any further action If Dir(myPath & "\QuoteP725.dotx") = "" Then 'Quote template does not exist MsgBox...
  5. davefish

    Late binding

    I have a few Excel programs running in Excel 2010, but will not run in Office 365 Excel 16 due to reference library issues. Can I just change the highlighted code below? Heklprequired please Sub ExportQuoteToWord725() 'Opens document template and fills out fields to create a quotation...
  6. davefish

    searching for text in a word table from Excel

    Hi Skip, thanks for the lead. I modified the code slightly and it works fine as below:- With ActiveDocument.Tables(7) For r = 1 To .Rows.Count If .Cell(r, c).Range.Text Like "*" & Range("O25").Value & "*" Then wordDoc.Tables(7).Rows(r + 1).Select wordApp.Selection.Rows.Add End If Next...
  7. davefish

    searching for text in a word table from Excel

    I've found something that seems to work to a degree, but it hangs The code that inserts the part number in the graphic above comes from a value in an excel spreadsheet and I have successful manager to find the row number using the code below:- With ActiveDocument.Tables(7) For r = 1 To...
  8. davefish

    searching for text in a word table from Excel

    I have an Excel SS that allows the user to make selections for a configurable product and once done produce a quote. I can successfully gather the data and launch a word template that works, but now I am asked to add or delete specific rows dependent on the selection. This means identifying text...
  9. davefish

    Dynamic part number creation...Should I use Select case, if statement or combination

    Hi Skip, The formula =MakePN(D11:D20) does work. With respect to the HH scenario, I changed how I presented this to the calculated this to cell D15 & D16 by concatenating them. and the whole process works just fine. Thanks you very much for your focus and apologies for my not too clear...
  10. davefish

    Dynamic part number creation...Should I use Select case, if statement or combination

    Hi Skip, I'll try and explain what I need as follows:- I have a number of Embedded Combo boxes on the sheet that allow the user to select certain values that make up a part number string. Some elements are optional and their position in the string is defined, so that...
  11. davefish

    Dynamic part number creation...Should I use Select case, if statement or combination

    Hi Guy's Hopefully this will clarify some our your questions:- For a system that has all attributes the part number code looks like this UC625-12-IN-HH-024D-R if There is an Un_armed value it adds UC625-12-[highlight #FCE94F]8UN[/highlight]-IN-HH-024D-R to the code and if a mod level...
  12. davefish

    Dynamic part number creation...Should I use Select case, if statement or combination

    I have a part number string that needs to be dynamic enough to handle null values for certain components. This takes the form UC625-16-[highlight #FCE94F]4UN[/highlight]-GN-HH-R-048-M3-T where if 4UN is a null value it's removed from the string. Similarly M3 & T can be removed in the same...
  13. davefish

    Finding a datakey and copying data from that row to another sheet

    Hi Zelgar, If I've understood you correctly it looks like this, but I do get errors Have I screwed this up? Regards Dave Sub DataSummary() Dim r As Integer, x As Integer, y As Integer Dim ws1 As Worksheet, ws2 As Worksheet Dim SumA r = 2...
  14. davefish

    Finding a datakey and copying data from that row to another sheet

    Hi Zelgar, I'm not a great fan of the outline tools so I'll have a go at the code. I'll come back to you whatever. Many Thanks Dave
  15. davefish

    Finding a datakey and copying data from that row to another sheet

    Hi Zelgar, The first option looks good to me. I have added a bit a code to try and sum the values per region as follows: - code ub DataSummary() Dim r As Integer, x As Integer, y As Integer Dim ws1 As Worksheet, ws2 As Worksheet r = 2...
  16. davefish

    Finding a datakey and copying data from that row to another sheet

    Hi Zelgar, That works great thank you, but is there any way of identifying which region they came from as each tab is a different set of data? If I can insert a sub header for each in the table ASEAN, Americas etc that would do me just fine. Regards Dave
  17. davefish

    Finding a datakey and copying data from that row to another sheet

    Hi Zelgar, As I was unsure which correction went with which code, so I tried combinations of the two. What I mean is your coded as is, followed by your code with Skip's correction, then finally with Skips code etc. I seem to get error messages whichever way I try it. Can you get this to work on...
  18. davefish

    Finding a datakey and copying data from that row to another sheet

    Hi Skip, Perhaps it's me, but... Public Sub DataSummary_Test() Dim x As Integer Dim y As Integer Dim ws1 As Worksheet, ws2 As Worksheet For Each ws2 In Worksheets With ws2 Select Case .Name Case "Middle East", "Europe", "ASEAN", "Americas" For Each rg In Range(.Cells(x...
  19. davefish

    Finding a datakey and copying data from that row to another sheet

    Hi Skip, Thank you for your advice so far. I tried the script but keep getting a "Loop Without Do" error message. I noticed there was no do statement so tried removing it only to get an "End Select with Select case Statement " error. Zelgar, I also tried your script to find an error message...
  20. davefish

    Finding a datakey and copying data from that row to another sheet

    As an aside, my earlier code did work, and I could run this for each sheet in the workbook separately, but it overwrote the data from other sheets in the summary sheet. I'm trying to summerise the data from four works sheets as a continuous list, so I tried to sue end(xldown) but again this...

Part and Inventory Search

Back
Top