I have a large amount of folder with sub folders, the folder name contains some special characters (@,#,%,_,-) Like that.
I have to find the folder by Main folder name,then replace it with alphabets for all sub folders
for example
& - AND
#- NUMBER
%-PERCENTAGE

Is that possible to do with VBA on excel, when i select the file path this will replace all the special characters with alphabet (name of the special characters).
Please anyone help me on this.

Thanks in advance
]]>Office Developmentgmmdineshhttp://www.vbforums.com/showthread.php?859343-Remove-special-characters-from-folder-file-path-by-VBAhttp://www.vbforums.com/showthread.php?859329-RESOLVED-Altering-Date-time-field-in-SQL-to-Now()&goto=newpost
Tue, 20 Feb 2018 18:22:57 GMTi am trying to change the date in this field to be the date and time currently

I need to get the current time form the internet. For example as I type "time now" in google its returns me my current location (country) time.

I do not wish to get the system time. All I want is to somehow get the time from the internet. I searched through the net but couldn't find working code to achieve this. any help would be appreciated.

If anyhow I could get the UTC time I can convert it into my time zone.

So, is there a away to get the UTC time?

thank you!
]]>Office Developmentlucky9http://www.vbforums.com/showthread.php?859259-RESOLVED-Current-time-form-the-net-server-or-UTC-timehttp://www.vbforums.com/showthread.php?859255-RESOLVED-VB-net-Word-interop-Templates-Deleting-tables-programmatically-from-templates&goto=newpost
Mon, 19 Feb 2018 03:38:05 GMTHi I am just an amateur programmer that has been using VB since vb4. Usually for fun but I have been working on a program for about a year now that needs to generate a MS Word report that will have paragraphs and tables in it. (The program will output an attending physician’s report.) I have found the documentation on this to be lacking to a degree. I am using Visual Studio 2017 and MS office 2016 and my program is a windows form program.
My question is this, my document will have the possibility of using up to 20 tables but most commonly will only have two. They are easy to create in word as part of template but I cannot figure out how to delete the ones that I will not be using in the template.
They are a bit of a pain in the neck to create programmatically as the creation is verbose code wise but I pretty much have figured out how to do this if it is what I need to do. It just seems rather inelegant when it is so easy to do via a template.
Hoping for a bit of advice as to which way to go. (and / or a hint or example or link to a website that has an example of programmatically deleting tables from a website if possible...or anything useful.) Thanks a whole bunch!Hi I am just an amateur programmer that has been using VB since vb4. Usually for fun but I have been working on a program for about a year now that needs to generate a MS Word report that will have paragraphs and tables in it. (The program will output an attending physician’s report.) I have found the documentation on this to be lacking to a degree. I am using Visual Studio 2017 and MS office 2016 and my program is a windows form program.

My question is this, my document will have the possibility of using up to 20 tables but most commonly will only have two. They are easy to create in word as part of template but I cannot figure out how to delete the ones that I will not be using in the template.

They are a bit of a pain in the neck to create programmatically as the creation is verbose code wise but I pretty much have figured out how to do this if it is what I need to do. It just seems rather inelegant when it is so easy to do via a template.

Hoping for a bit of advice as to which way to go. (and / or a hint or example or link to a website that has an example of programmatically deleting tables from a website if possible...or anything useful.) Thanks a whole bunch!
]]>Office Developmentscrachhttp://www.vbforums.com/showthread.php?859255-RESOLVED-VB-net-Word-interop-Templates-Deleting-tables-programmatically-from-templatesOpen a webpage in Chrome and download files and save them on a share drive folderhttp://www.vbforums.com/showthread.php?859241-Open-a-webpage-in-Chrome-and-download-files-and-save-them-on-a-share-drive-folder&goto=newpost
Sun, 18 Feb 2018 19:27:51 GMTI have a Webpage (which is built using apache aurora, more of an web based application), on this webpage the user has to navigate to a reporting tab on left hand side navigation panel and then he has to click on the hyperlinks which are named as "Download" and when the user clicks on the hyperlink the save as box appears to save the .csv, .xlsx or .pdf files and there are multiple such download hyperlinks on the page. I am trying to build a macro which will open the chrome navigate to the URL and then search for Download Text and click and save each link file into specified share drive path. below is what i have got from my search but this is for Internet explorer and given that my webpage doesn't work with the internet explorer, I need this to work with Google Chrome.

Set ieDoc = ieApp.Document
For Each ele In ieApp.Document.getElementsByTagname("download")

If ele.innerHTML = "CSV" Then
DoEvents
ele.Click

End If
Next

ieApp.Quit
End Sub

]]>Office Developmentabhay_547http://www.vbforums.com/showthread.php?859241-Open-a-webpage-in-Chrome-and-download-files-and-save-them-on-a-share-drive-folderhttp://www.vbforums.com/showthread.php?859187-RESOLVED-Determine-whole-word-after-finding-first-letter&goto=newpost
Sat, 17 Feb 2018 03:12:33 GMT
' more code
---------
]]>Given code like this which looks for headings of a certain style that start with "M", how do I Debug.Print the word in the heading that contains the "M"? It will always be the first word. Are the .Text... and .Execute... lines correct?

]]>Office DevelopmentMartinLisshttp://www.vbforums.com/showthread.php?859187-RESOLVED-Determine-whole-word-after-finding-first-letterMsOf13 Disabling an Access database by datehttp://www.vbforums.com/showthread.php?859183-Disabling-an-Access-database-by-date&goto=newpost
Fri, 16 Feb 2018 22:22:59 GMTI have a few databases at work. You need to "login" to get access to the database.
Only some of them are only for temporarely use. Is it possible to write a code for blocking/disabling after a certain date?
For example; it works only till 30 March, after that is wil automaticly close directly after opening. Or it give a warning and then it closes.
I hope that this is possible.

' Calls functions to clear and populate a treeview control
' Parameters:
' strForm Name of the form
' strTV TreeView control name
' strSourceName Name of the table or query containing the data used to populate the treeview
' strChildField ID field for the child records
' strParentField Parent ID Field
' strTextField Field containing text that will be used as node labels
'
Sub FillTreeView(tvwTree As Object, strSourceName As String, strChildField As String, strParentField As String, strTextField As String)
Dim strSQL As String
Dim rs As DAO.Recordset

' Recursive function to populate a treeview control
' Parameters:
' strFormName Name of the form
' strTreeViewName TreeView control name
' rs Recordset containing the data used to populate the treeview
' strChildField ID field for the child records
' strParentField Parent ID Field
' strTextField Field containing text that will be used as node labels
' varParentID Optional parameter that only gets passed for recursive calls to this function. Specifies the ID of the current record to be used as a
' ParentID when searching the recordset for "grand-children", etc.
Sub AddTreeData(objTV As TreeView, rs As DAO.Recordset, strChildField As String, strParentField As String, strTextField As String, Optional varParentID As Variant)
Dim nodChild As Node
Dim nodParent As Node
Dim strLabel As String
Dim strNodeID As String
Dim strCriteria As String
Dim strBookmark As String

On Error GoTo EH

' Test for a circular reference
If rs(strChildField) = rs(strParentField) Then GoTo EH_CircularReference

' If the optional parameter is missing, then this is the first(non-recursive) call to this function.
' Set the critieria to look for a parent id of 0.
If IsMissing(varParentID) Then
strCriteria = strParentField & " = 0 "
Else
' Otherwise, extract the childID portion of the node ID, which was passed as an optional parameter.
strCriteria = strParentField & " = " & Mid(varParentID, InStr(1, varParentID, "C") + 1)
' Define the parent node
Set nodParent = objTV.Nodes("node" & varParentID)
End If

' If optional parameter is missing (first call to this function)...
If Not IsMissing(varParentID) Then
'add new node to the next higher node for this record
Set nodChild = objTV.Nodes.Add(nodParent, tvwChild, strNodeID, strLabel)
Else
' Otherwise, add new node to the top level of the tree
Set nodChild = objTV.Nodes.Add(, , strNodeID, strLabel)
End If

' Bookmark our place in the recordset so that we can resume the search from the same point after the recursive call to this function.
strBookmark = rs.Bookmark

I am hoping one of the guru's here can help me (or even a non-guru :) ). I know just enough to be dangerous, but not enough to do what i need.

I am trying to use VBA to extract the thickness, width, and length for each of the 3 components that make up a pallet from an export i get (2 attachments). I want to export the data into a pricing sheet i use, it will save considerable time and errors that occur from typing them in.

I need VBA to allow me to open a .xml file (i attached 2 example), then insert the component dimensions into my pricing sheet. I tried uploading my pricing sheet, but the site will not allow me to. It is a pretty simple sheet, i put a screen shot below. One issue is sometimes there are 2 width boards on top or bottom, so i need VBA to recognize that and insert either 2 sizes on the top and bottom or just one size. The two files i was able to attach show an example of each.

I have the code below that allows me to select the file i want to import data from, but i am lost from there...
I really appreciate any help!! Thank you!!

]]>Office Developmentdkeyserhttp://www.vbforums.com/showthread.php?859101-Need-to-use-VBA-to-copy-data-from-a-workbook-into-my-workbook-based-on-matching-critehttp://www.vbforums.com/showthread.php?859095-RESOLVED-Running-SQL-in-VBA&goto=newpost
Wed, 14 Feb 2018 21:49:36 GMTHello guys i have a duplicate button with some SQL code embedded into it and i cannot get the sql code to execute here is a copy of the code

]]>Office Developmentcubsm22phttp://www.vbforums.com/showthread.php?859095-RESOLVED-Running-SQL-in-VBAMsOf10 Dictionary - Use of PatternSearch Parameterhttp://www.vbforums.com/showthread.php?859091-Dictionary-Use-of-PatternSearch-Parameter&goto=newpost
Wed, 14 Feb 2018 16:46:59 GMTCan someone who is familiar with it provide an example please?Can someone who is familiar with it provide an example please?
]]>Office DevelopmentMartinLisshttp://www.vbforums.com/showthread.php?859091-Dictionary-Use-of-PatternSearch-ParameterMacro for finding most frequent occuring strings in a listhttp://www.vbforums.com/showthread.php?859087-Macro-for-finding-most-frequent-occuring-strings-in-a-list&goto=newpost
Wed, 14 Feb 2018 14:52:38 GMTHi everyone,
I have a project where I am working with really large datasets, and I have to use excel for it.
One of the tasks to do is to extract most frequently occuring string, second most frequent string, third etc...
I know that there is a formula to do this, but I would like to keep it simpler and do it with macro..
Any experts here who can help?
Thanks in advanceHi everyone,

I have a project where I am working with really large datasets, and I have to use excel for it.

One of the tasks to do is to extract most frequently occuring string, second most frequent string, third etc...

I know that there is a formula to do this, but I would like to keep it simpler and do it with macro..
Any experts here who can help?

Thanks in advance
]]>Office Developmentnn92http://www.vbforums.com/showthread.php?859087-Macro-for-finding-most-frequent-occuring-strings-in-a-listhttp://www.vbforums.com/showthread.php?859011-RESOLVED-AutoSave&goto=newpost
Mon, 12 Feb 2018 19:35:10 GMTHello
I am using Excel 2010 and want to know if I can use the command ActiveWorkbook.Save to
trigger when a value in a cell is changed? I wonder if there is a cell change function.

I know there is a way to set it thru Options but it isn't working. I have it set to one minute.
I read where it doesn't work well with a workbook that has macros in it.

Thanks for any help!
]]>Office DevelopmentStratohttp://www.vbforums.com/showthread.php?859011-RESOLVED-AutoSavehttp://www.vbforums.com/showthread.php?859009-RESOLVED-creating-duplicate-record-VBA&goto=newpost
Mon, 12 Feb 2018 19:32:40 GMTi want to create a button to duplicate record shown on the form every field to be the same except the Key which is [Order Number]
this will have to be changed according to the first 4 numbers if the first four numbers are 0000-XXXX-XXXX then the new [Order Number] for that record should be 0001-XXXX-XXXX, same as if the [Order Number] is 0001-XXXX-XXXX then the new [Order Number] should be 0002-XXXX-XXXX

Attached Images

]]>Office Developmentcubsm22phttp://www.vbforums.com/showthread.php?859009-RESOLVED-creating-duplicate-record-VBACompare the numbers in 2 columns and reconcilehttp://www.vbforums.com/showthread.php?858947-Compare-the-numbers-in-2-columns-and-reconcile&goto=newpost
Sat, 10 Feb 2018 20:34:37 GMTHi, I am trying to compare 2 columns and find the match of numbers e.g. column A has 108.33 value and column B has the split of the same value .i.e. 33.33, 50 and 25 so the macro should loop through column A and B and find such matches and color code them into one unique color in both column A and B.

I have come across the below macro through my search but this is to find the exact matches. can someone help.

Set rng1 = ThisWorkbook.Sheets("Sheet1").Columns("A:A")
Set rng2 = ThisWorkbook.Sheets("Sheet1").Columns("B:B")
For Each rCell In rng1
rCell.Interior.ColorIndex = xlNone
rCell.Validation.Delete
result = WorksheetFunction.CountIf(rng2, rCell)
If result = 0 Then
rCell.Interior.ColorIndex = xlNone
ElseIf result = 1 Then
rCell.Interior.Color = vbGreen
With rCell.Validation
.Add xlValidateInputOnly
.InputMessage = "The value is " & result & "time occured in " & rng2.Address & "."
End With

ElseIf result = 2 Then
rCell.Interior.Color = vbYellow
With rCell.Validation
.Add xlValidateInputOnly
.InputMessage = "The value is " & result & " time occured."
End With

ElseIf result = 3 Then
rCell.Interior.Color = vbBlue
With rCell.Validation
.Add xlValidateInputOnly
.InputMessage = "The value is " & result & " time occured."
End With
ElseIf result = 4 Then
rCell.Interior.Color = vblavender
With rCell.Validation
.Add xlValidateInputOnly
.InputMessage = "The value is " & result & " time occured."
End With