Re: Macro Code Should Change When entered Cell Value matched????
Hello amiable,
It would be a great help if we could see your actual Code where you want to make the change.
Please consider:
Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .
Re: Macro Code Should Change When entered Cell Value matched????
Am using different file name, so when am running the file, i need to change the file name from macro, so instead ed of go to edit->vb macro, If possible,in work only, if i enter the data, after that data will replace the code in particular line. If third person whats to run the code, just give the file name and use the short cut key to run the code.
So no need to go and modify the code.
This is sample code.
So i need to change the 602.VB name every time when am running thedifferent vb code and SHEET 7 also i need to change, SHEET7 is replacing the all value.
Re: Macro Code Should Change When entered Cell Value matched????
Hi Norie,
I am facing Error 91, Subscript out of range, This is my code, I have updated the your code also.
In G5 Cell, I am giving the file name. In ws variable cell value is not assign. pls find the attachment
Please help this issue.
PHP Code:
Sub Windows()
Dim ws As Worksheet Dim rngFnd As Worksheet Dim strSheet As String
While end_require = False For x = 1 To Len(cellcont) If Mid(cellcont, x, srchlen) = Sheet1.Cells(a, 2) Then pos = x newstring1 = Mid(cellcont, 1, pos - 1) newstring2 = Sheet1.Cells(a, 3) newstring3 = Mid(cellcont, pos + srchlen, Len(cellcont) - (pos + (srchlen - 1))) ws.Cells(ActiveCell.Row, ActiveCell.Column) = newstring1 + newstring2 + newstring3 End If Next x Cells.FindNext(After:=ActiveCell).Activate cellcont = ActiveCell If sactrow = ActiveCell.Row And sactcol = ActiveCell.Column Then end_require = True End If
Bookmarks