VBS Select Column from ActiveCell

Krothos

New Member
Joined
Sep 29, 2015
Messages
4
I'm hoping you can help me with the following script:

VBA Code:
Sub BootsSpeed()

Dim mycell
mycell = ActiveCell.Address

Range("S34").Value = "Boots of Speed - Venitt"
Range("T34").Value = "x"
Range("U34").Value = Range("U" & (ActiveCell.Row))
If Range("Characters!AU10").Value = "" _
    Then Range(ActiveCell.Column & "34").Value = 1 _
    Else Range(ActiveCell.Column & "34").Value = Range("Characters!AU10") + 1

Call Sort_Combat

Range(mycell).Offset(1, 0).Select

End Sub

My issue is with the IF statement where I'm trying to enter a value into same column as the active cell, yet on row 34. I keep getting an error "Method 'Range' of object '_Global' failed", where it highlights the ELSE line when I select Debug. The rest of the code works as expected when I comment out the IF/THEN/ELSE commands.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Try it like
VBA Code:
Cells(34, ActiveCell.Column )
 
Upvote 0
Solution
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,782
Messages
6,121,532
Members
449,037
Latest member
tmmotairi

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