• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Help with error and vba code|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / Help with error and vba code|VBA & Macros|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumVBA & MacrosHelp with error and vba code
sp_PrintTopic sp_TopicIcon
Help with error and vba code
Avatar
David Booby

Active Member
Members
Level 0
Forum Posts: 5
Member Since:
May 20, 2023
sp_UserOfflineSmall Offline
1
May 20, 2023 - 3:13 pm
sp_Permalink sp_Print

Could someone please tell me why im getting a vba error in this excel database when adding data please
im just learning excel Thanks

Avatar
Alan Sidman
Steamboat Springs, CO
Member
Members


Trusted Members
Level 0
Forum Posts: 149
Member Since:
October 18, 2018
sp_UserOfflineSmall Offline
2
May 21, 2023 - 1:58 am
sp_Permalink sp_Print

Attached file is unreadable. Please try again.

Avatar
David Booby

Active Member
Members
Level 0
Forum Posts: 5
Member Since:
May 20, 2023
sp_UserOfflineSmall Offline
3
May 21, 2023 - 6:15 am
sp_Permalink sp_Print sp_EditHistory

Try this one

Avatar
David Booby

Active Member
Members
Level 0
Forum Posts: 5
Member Since:
May 20, 2023
sp_UserOfflineSmall Offline
4
May 21, 2023 - 5:24 pm
sp_Permalink sp_Print

here it is as a zip

Avatar
Alan Sidman
Steamboat Springs, CO
Member
Members


Trusted Members
Level 0
Forum Posts: 149
Member Since:
October 18, 2018
sp_UserOfflineSmall Offline
5
May 22, 2023 - 5:59 am
sp_Permalink sp_Print

unable to assist. File is locked as read only and cannot change on my side. Macro will not run as it is blocked by security on your end. Sorry. Good Luck.

Avatar
Velouria
London or thereabouts
Moderator
Members


Trusted Members

Moderators
Level 4
Forum Posts: 648
Member Since:
November 1, 2018
sp_UserOfflineSmall Offline
6
May 22, 2023 - 7:36 pm
sp_Permalink sp_Print

How big is your monitor? Your userform is over 6k pixels wide, which makes it extremely hard to use!

Avatar
David Booby

Active Member
Members
Level 0
Forum Posts: 5
Member Since:
May 20, 2023
sp_UserOfflineSmall Offline
7
May 23, 2023 - 5:23 am
sp_Permalink sp_Print

@Velouria Ok i have to add code to stop it from resizing don't know why it dose it sometime? i been going into vba and resize it back to original size.

Avatar
Hans Hallebeek
the Netherlands
Member
Members
Level 0
Forum Posts: 116
Member Since:
October 17, 2018
sp_UserOfflineSmall Offline
8
May 23, 2023 - 4:04 pm
sp_Permalink sp_Print sp_EditHistory

The userform is not resizing the userform settings are set to this size.
It's very bad coding and the error, well that's another issue.
O yes, and which version of Excel are you using?

Avatar
Velouria
London or thereabouts
Moderator
Members


Trusted Members

Moderators
Level 4
Forum Posts: 648
Member Since:
November 1, 2018
sp_UserOfflineSmall Offline
9
May 24, 2023 - 6:25 pm
sp_Permalink sp_Print

It sounds (and looks) to me as though there may be some corruption in your workbook. I'd suggest rebuilding it.

The following users say thank you to Velouria for this useful post:

Alan Sidman
Avatar
Hans Hallebeek
the Netherlands
Member
Members
Level 0
Forum Posts: 116
Member Since:
October 17, 2018
sp_UserOfflineSmall Offline
10
May 25, 2023 - 9:38 pm
sp_Permalink sp_Print

When you look at the form size it's set to huge width and height.
Question of redesigning the userform and if needed use the zoom function.
Nothing to do with corrupted workbook for as far as I can see.
The OP has not informed us of the Office version he's using

Avatar
Velouria
London or thereabouts
Moderator
Members


Trusted Members

Moderators
Level 4
Forum Posts: 648
Member Since:
November 1, 2018
sp_UserOfflineSmall Offline
11
May 26, 2023 - 4:46 pm
sp_Permalink sp_Print

Look at the controls on the form - do any of them look right to you? They all look distorted and they appear much bigger than their properties suggest they should be. For example, cmbShop is a combobox that is 150 pixels wide but it barely fits on my 1920x1080 monitor!

Avatar
Hans Hallebeek
the Netherlands
Member
Members
Level 0
Forum Posts: 116
Member Since:
October 17, 2018
sp_UserOfflineSmall Offline
12
May 27, 2023 - 4:23 pm
sp_Permalink sp_Print

I honestly don't knwo what you have done but the size of the values in the Userform is out of bounds.
Furthermore the code is, if I may say so, very unprofesiionally built without any real 'intelligence built into it.
I made some adjustments to the form so that it's readable and visible like it should, but the code behind the buttons , well ...

Hope you can work witth this version and I suggest you lookup some code snippets and ideas on-line to make it user friendly.
Sorry for the 'bites' but as a VBA coder it hurts to see code like this

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Catalin Bombea
Guest(s) 9
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 873
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 222
Jessica Stewart: 215
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Anthony van Riessen
Erlinda Eloriaga
Abisola Ogundele
MARTYN STERRY
Rahim Lakhani
Ngoc Qui Nguyen
Clement Mansfield
Rose .
Bindu Menon
Baruch Zemer
Forum Stats:
Groups: 3
Forums: 24
Topics: 6352
Posts: 27779

 

Member Stats:
Guest Posters: 49
Members: 32319
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.