Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

359
Visualizações
How do I put user's input from inputbox into a cell [VBA]

I don't think my title is clear enough, so I'll try my best to explain what I need to do.

I have an input box where the user will type in current month in the format of first three characters + Sale (i.e. JunSale). I want to return this user's input into a specific cell. This specific cell already has stuff in it (i.e. MaySale). So once a user types in the input, the cell will now read JunSale not MaySale.

I'm very new to vba, so please excuse my code being really messy and having functions that people recommend avoiding.

Below is my code and it gives me an error message that reads: Compile Error: Method or data member not found with highlight on the very last line of the code.

How should I fix this code? I've been fighting with it for 3 hours and have made no progress :'(

Any help is appreciated thank you!!!!

Edit:

This is the code I have now and the error message I get is Application-defined or object-defined error.

Dim ws As Worksheet
Set ws = ThisWorkbook.Worksheets("Sales Calc")
Dim ActSales As Range


With Worksheets("Sales Calc").Cells
    Set ActSales = .Find("Forecast Sales -->>", After:=Range("DH173"), LookIn:=xlValues)
    If Not ActSales Is Nothing Then
        ActSales.Select
    End If
End With

ActiveCell.Offset(rowOffset:=0, ColumnOffset:=-1).Select

Range(ActiveCell) = Application.InputBox("Enter the Latest Month with Actual Sales Data")
about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Just use this method - no Range() needed when referencing activecell.

ActiveCell = Application.InputBox("Enter the Latest Month with Actual Sales Data")
about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda