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

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
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,215,417
Messages
6,124,791
Members
449,188
Latest member
Hoffk036

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