Looking for help in code change

santoshloka

Board Regular
Joined
Aug 31, 2017
Messages
125
i have to change code manually every time to work my code

Code:
 browobject.document.getElementById("mapDatum").Value = "1"
        browobject.document.getElementById("utmZone").Value = "[U][COLOR=#b22222]43[/COLOR][/U]"  [COLOR=#0000ff]---->' "=B3"[/COLOR]
        browobject.document.getElementById("utmHemi").Value = [U]"[COLOR=#b22222]N[/COLOR][/U]"   [COLOR=#0000ff]---->' "=C3"[/COLOR]


Find the red color in my code, is it possible to give cell reference instead of giving value manually all the time please help me save my time

I am trying to change code like Blue Color in my code,its not taking reference

SHEET1
B3=43
C3=N
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Does this work?
(I doubt you need to place quotes everywhere)


Code:
browobject.document.getElementById("mapDatum").Value = 1
        browobject.document.getElementById("utmZone").Value = Range("B3")
        browobject.document.getElementById("utmHemi").Value = Range("C3")

or possibly

Code:
browobject.document.getElementById("mapDatum").Value = 1
        browobject.document.getElementById("utmZone").Value = Cells(3, 2)
        browobject.document.getElementById("utmHemi").Value = Cells(3, 3)

If you use the second piece of code you can change the first 3 and replace it with a variable from a loop, as I suspect that's what you probably want next.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,007
Messages
6,122,670
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top