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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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
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...
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...
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...
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...
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.