Typed text changes cell

XDamian

New Member
Joined
Apr 19, 2010
Messages
9
I created simple macros that do the same thing. A text is typed when clicking on a button that runs my macro.
I created then a macro to delete the texts that I typed.
The texts generated by my macros appear in cells different to those I originally chose when creating my macro.
My Excel version is very old (2003).
Why does my text jump?
 
Are you saying it is solved or you still have an issue?
 
Upvote 0

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Ok, make 2 copies of your sheet. Then in a separate module paste (paste them, do not try to type them) the 3 codes below in the module.
With the first copy active run Damian1
Code:
Sub Damian1()
Range("G2:G100").ClearContents
End Sub
Does G2:G100 clear?
If it does (while the cells are clear) run Damian2
Code:
Sub Damian2()
Range("G4").Value = "Doing a test on macros"
Range("G5").Value = "This text typed in G5 appears in G2 when I activate the macro"
End Sub
Does the text go in G4 and G5 respectively?
If yes make the 2nd copy of the sheet active and run Damian3
Code:
Sub Damian3()
Range("G6").Select
Range("G2:G100").ClearContents
Range("G6").Value = "Is this G6?"
End Sub
Does the text appear in G6.

If all the above does happen then it is all working as I would expect it to and I don't understand what you need doing and so I will need you to re-explain your requirement.
 
Last edited:
Upvote 0
Ok, make 2 copies of your sheet. Then in a separate module paste (paste them, do not try to type them) the 3 codes below in the module.
With the first copy active run Damian1
Code:
Sub Damian1()
Range("G2:G100").ClearContents
End Sub
Does G2:G100 clear?
If it does (while the cells are clear) run Damian2
Code:
Sub Damian2()
Range("G4").Value = "Doing a test on macros"
Range("G5").Value = "This text typed in G5 appears in G2 when I activate the macro"
End Sub
Does the text go in G4 and G5 respectively?
If yes make the 2nd copy of the sheet active and run Damian3
Code:
Sub Damian3()
Range("G6").Select
Range("G2:G100").ClearContents
Range("G6").Value = "Is this G6?"
End Sub
Does the text appear in G6.

If all the above does happen then it is all working as I would expect it to and I don't understand what you need doing and so I will need you to re-explain your requirement.


Thanks a million for your effort, really. I will just let it be. So much nuisance for such a simple two lines is a waste of time.
 
Upvote 0



Thanks a million for your effort, really. I will just let it be. So much nuisance for such a simple two lines is a waste of time.​


Obviously it is your choice if you want to "let it be" but I don't consider it a nuisance or a waste of time because if you can't get "a simple two lines" to work the way you want to (or understand why they aren't working the way you expect) then how will you get on if you need to progress to any larger/more complex code?

As far as I am concerned we all have to start somewhere and we have no problem trying to help with even "a simple two lines" if it is of some benefit to someone.

But as I previously stated it is your choice if you do want to end the thread.​
 
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,237
Members
448,555
Latest member
RobertJones1986

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